JDK-8187601 : Unrolling more when SLP auto-vectorization failed
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2017-09-18
  • Updated: 2025-09-19
  • Resolved: 2017-10-05
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 10
10 b31Fixed
Related Reports
Relates :  
Relates :  
Description
For below Java code, which can't be auto-vectorized:
  public static void accessArrayConstants(int[] array) {
      for (int j = 0; j < 1024; j++) {
          array[0]++;
          array[1]++;
      }
  }
Current C2 unrolls the loop to 8 times on X86 and 4 times on AArch64, which is limited by architecture's vector size. Get better performance, we should unroll more until reaching the unroll limitation.
Comments
URL: http://hg.openjdk.java.net/jdk10/master/rev/d78db2ebce5e User: jwilhelm Date: 2017-11-04 02:58:06 +0000
04-11-2017

URL: http://hg.openjdk.java.net/jdk10/hs/rev/d78db2ebce5e User: kvn Date: 2017-10-05 08:04:54 +0000
06-10-2017

Changeset: d78db2ebce5e Author: zyao Date: 2017-09-20 18:30 +0800 URL: http://hg.openjdk.java.net/jdk10/hs/rev/d78db2ebce5e
05-10-2017

I ran performance tests and did not find significant regressions. I will push changes.
05-10-2017

Latest webrev: http://cr.openjdk.java.net/~zyao/8187601/webrev.01/
04-10-2017