JDK-8305707 : SuperWord should vectorize reverse-order reduction loops
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 21
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-04-06
  • Updated: 2023-04-11
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.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
Reverse-order reduction loops seem to to be vectorized.

Reproduce with attached file - swap between increment and decrement loop:
java -XX:-TieredCompilation -Xbatch -XX:CompileCommand=compileonly,Test::test -XX:+TraceSuperWord -XX:+TraceNewVectors Test.java

Maybe it is as simple as allowing reductions to go in both directions in "SuperWord::reduction".
Currently, we only seem to allow s1 to be input of s2, and not the other way around.