JDK-8325155 : C2 SuperWord: remove alignment boundaries
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23,24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-02-02
  • Updated: 2025-04-21
  • Resolved: 2024-06-07
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 24
24 b02Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
SuperWord::memory_alignment
computes offsets modulo vector_width:
int off_rem = offset % vw;

This is an artefact of the old AlignVector mechanism, to avoid packing over alignment boundaries.

TODO find examples where this made a difference. 
Comments
After introduction of the new test compiler/loopopts/superword/TestCompatibleUseDefTypeSize.java we get failures (on Linux x86_64 Alpine, KVM virtualization based) : One or more @IR rules failed: Failed IR Rules (2) of Methods (2) ---------------------------------- 1) Method "static java.lang.Object[] compiler.loopopts.superword.TestCompatibleUseDefTypeSize.test3(int[],int[])" - [Failed IR rules: 1]: * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={"sse4.1", "true", "asimd", "true"}, counts={"_#V#LOAD_VECTOR_I#_", "> 0", "_#V#ADD_VI#_", "> 0", "_#STORE_VECTOR#_", "> 0"}, failOn={}, applyIfPlatform={"64-bit", "true"}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})" > Phase "PrintIdeal": - counts: Graph contains wrong number of nodes: * Constraint 1: "(\\d+(\\s){2}(LoadVector.*)+(\\s){2}===.*vector[A-Za-z]\\[4\\]:\\{int\\})" - Failed comparison: [found] 0 > 0 [given] - No nodes matched! * Constraint 2: "(\\d+(\\s){2}(AddVI.*)+(\\s){2}===.*vector[A-Za-z]\\[4\\]:\\{int\\})" - Failed comparison: [found] 0 > 0 [given] - No nodes matched! * Constraint 3: "(\\d+(\\s){2}(StoreVector.*)+(\\s){2}===.*)" - Failed comparison: [found] 0 > 0 [given] - No nodes matched! 2) Method "static java.lang.Object[] compiler.loopopts.superword.TestCompatibleUseDefTypeSize.test4(int[],int[])" - [Failed IR rules: 1]: * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={"sse4.1", "true", "asimd", "true"}, counts={"_#V#LOAD_VECTOR_I#_", "> 0", "_#V#ADD_VI#_", "> 0", "_#STORE_VECTOR#_", "> 0"}, failOn={}, applyIfPlatform={"64-bit", "true"}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})" > Phase "PrintIdeal": - counts: Graph contains wrong number of nodes: * Constraint 1: "(\\d+(\\s){2}(LoadVector.*)+(\\s){2}===.*vector[A-Za-z]\\[4\\]:\\{int\\})" - Failed comparison: [found] 0 > 0 [given] - No nodes matched! * Constraint 2: "(\\d+(\\s){2}(AddVI.*)+(\\s){2}===.*vector[A-Za-z]\\[4\\]:\\{int\\})" - Failed comparison: [found] 0 > 0 [given] - No nodes matched! * Constraint 3: "(\\d+(\\s){2}(StoreVector.*)+(\\s){2}===.*)" - Failed comparison: [found] 0 > 0 [given] - No nodes matched! >>> Check stdout for compilation output of the failed methods ############################################################# - To only run the failed tests use -DTest, -DExclude, and/or -DScenarios. - To also get the standard output of the test VM run with -DReportStdout=true or for even more fine-grained logging use -DVerbose=true. ############################################################# compiler.lib.ir_framework.driver.irmatching.IRViolationException: There were one or multiple IR rule failures. Please check stderr for more information. at compiler.lib.ir_framework.driver.irmatching.IRMatcher.reportFailures(IRMatcher.java:61) at compiler.lib.ir_framework.driver.irmatching.IRMatcher.match(IRMatcher.java:49) at compiler.lib.ir_framework.TestFramework.runTestVM(TestFramework.java:754) at compiler.lib.ir_framework.TestFramework.start(TestFramework.java:719) at compiler.lib.ir_framework.TestFramework.start(TestFramework.java:339) at compiler.lib.ir_framework.TestFramework.run(TestFramework.java:223) at compiler.lib.ir_framework.TestFramework.run(TestFramework.java:212) at compiler.loopopts.superword.TestCompatibleUseDefTypeSize.main(TestCompatibleUseDefTypeSize.java:75) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333) at java.base/java.lang.Thread.run(Thread.java:1575)
11-06-2024

Changeset: 944aeb81 Author: Emanuel Peter <epeter@openjdk.org> Date: 2024-06-07 05:01:23 +0000 URL: https://git.openjdk.org/jdk/commit/944aeb81b16e3e7a3019cafdefe67b797fa6be96
07-06-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/18822 Date: 2024-04-17 17:58:53 +0000
13-05-2024

This may require us to do things I was doing for JDK-8309267, see attached patch.
06-02-2024