JDK-8371768 : AArch64: test/hotspot/jtreg/compiler/loopopts/superword/TestReductions.java fails on SVE after JDK-8340093
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 26
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • CPU: aarch64
  • Submitted: 2025-11-13
  • Updated: 2025-11-24
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
Causes :  
Description
The following two sub-tests failed on Nvidia Grace machine(128-bit SVE).

  compiler/loopopts/superword/TestReductions.java#force-vectorization
  compiler/loopopts/superword/TestReductions.java#vanilla

Note that this test case can pass if -XX:UseSVE=0 is used.

Here shows the snippet of the error log:

1) Method "private static double compiler.loopopts.superword.TestReductions.doubleAddBig()" - [Failed IR rules: 1]:                                                                
   * @IR rule 2: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={}, applyIfPlatformOr={}, applyIfPlatform={}, failOn={"_#V#L
OAD_VECTOR_D#_"}, applyIfOr={}, applyIfCPUFeatureAnd={"asimd", "true"}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "PrintIdeal":
       - failOn: Graph contains forbidden nodes:
         * Constraint 1: "(\d+(\s){2}(LoadVector.*)+(\s){2}===.*vector[A-Za-z]<D,\d+>)"
           - Matched forbidden nodes (18):
             * 1125  LoadVector  === 857 7 874  |351  [[ 1127 1129 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vectorx<
D,2>
             * 1126  LoadVector  === 814 7 878  |393  [[ 1127 1131 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vectorx<
D,2>
             * 1128  LoadVector  === 771 7 881  |434  [[ 1129 1131 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vectorx<
D,2>
             * 1133  LoadVector  === 857 7 1002  |351  [[ 1135 1137 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vectorx
<D,2>
             * 1134  LoadVector  === 814 7 1010  |393  [[ 1135 1139 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vectorx
<D,2>
             * 1136  LoadVector  === 771 7 1016  |434  [[ 1137 1139 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vectorx
<D,2>
             * 1152  LoadVector  === 1198 7 1153  |351  [[ 1150 1151 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vector
x<D,2>
             * 1160  LoadVector  === 1198 7 1161  |351  [[ 1158 1159 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vector
x<D,2>
             * 1164  LoadVector  === 1273 7 1165  |393  [[ 1158 1163 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vector
x<D,2>
             * 1168  LoadVector  === 1273 7 1169  |393  [[ 1150 1167 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vector
x<D,2>
             * 1171  LoadVector  === 1248 7 1172  |434  [[ 1151 1167 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vector
x<D,2>
             * 1174  LoadVector  === 1248 7 1175  |434  [[ 1159 1163 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vector
x<D,2>
             * 1287  LoadVector  === 857 7 1288  |351  [[ 1285 1286 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vectorx
<D,2>
             * 1295  LoadVector  === 857 7 1296  |351  [[ 1293 1294 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vectorx
<D,2>
             * 1299  LoadVector  === 814 7 1300  |393  [[ 1293 1298 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vectorx
<D,2>
             * 1303  LoadVector  === 814 7 1304  |393  [[ 1285 1302 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vectorx
<D,2>
             * 1306  LoadVector  === 771 7 1307  |434  [[ 1286 1302 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vectorx
<D,2>
             * 1309  LoadVector  === 771 7 1310  |434  [[ 1294 1298 ]]  @double[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=7; mismatched #vectorx
<D,2>
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/28423 Date: 2025-11-20 11:02:54 +0000
20-11-2025

Causes noise in my local testing, so I'll handle the IR test fixups.
20-11-2025

ILW = Test fails due to unexpected vectorization (test bug), single test on 128-bit SVE machines, no workaround = MLH = P4
14-11-2025

[~epeter] Thanks for the reminder. I’ll benchmark the relevant auto-vectorization cases on all available AArch64 machines before and after introducing the cost model.
13-11-2025

[~haosun] Right. I missed that SVE needs to have its IR rule adapted, and probably vectorizes more than NEON. We need to fix the IR rules. I don't have access to an SVE machine. Since this is only a test bug, it does not have high priority compared to other tasks. So feel free to propose a patch yourself. Additionally: It may make sense to run the benchmarks I ran for NEON and x64 in JDK-8340093, to ensure you don't experience any regressions on SVE. I can't do that because I could at best emulate SVE, which does not really allow benchmarking. This may also be of interest to [~fgao] or others at ARM.
13-11-2025