JDK-8247307 : C2: Loop array fill stub routines are not called
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,14,15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2020-06-10
  • Updated: 2024-11-13
  • Resolved: 2020-06-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16 b04Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
C2 has a loop optimization phase called intrinsify_fill [1]. It recognizes the code pattern of Java array initialization in a loop and generates calls to some array fill stub routines for better performance and smaller code size. But in latest jdk master (14/15), the calls to array fill stubs are not generated. Generated code shows the array initialization loops are automatically unrolled and vectorized.

If this phase works, methods of java.util.Arrays.fill() should be optimized as well. We should check why this doen't work and try to fix it if this phase.

[1] http://hg.openjdk.java.net/jdk/jdk/file/f1f88e6fad02/src/hotspot/share/opto/loopTransform.cpp#l3421
Comments
Changeset: ac4f14c3 Author: Pengfei Li <pli@openjdk.org> Date: 2020-06-28 06:15:31 +0000 URL: https://git.openjdk.java.net/mobile/commit/ac4f14c3
02-07-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/a95bc0e455e3 User: pli Date: 2020-06-28 06:21:30 +0000
28-06-2020

review thread https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2020-June/038605.html
28-06-2020