-
Bug
-
Resolution: Fixed
-
P3
-
17, 21, 23, 24
-
b11
This patch should fix it:
diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp
index 0e1328a4485..5b420487b06 100644
--- a/src/hotspot/share/opto/superword.cpp
+++ b/src/hotspot/share/opto/superword.cpp
@@ -2272,7 +2272,7 @@ Node_List* PackSet::strided_pack_input_at_index_or_null(const Node_List* pack, c
return nullptr; // size mismatch
}
- for (uint i = 1; i < pack->size(); i++) {
+ for (uint i = 0; i < pack->size(); i++) {
if (pack->at(i)->in(index) != pack_in->at(i * stride + offset)) {
return nullptr; // use-def mismatch
}
-----------------------
Reproduce with (passes with -Xint):
java Test1b.java
We can see that it vectorizes (even though it should not):
./java -XX:CompileCommand=printcompilation,Test1::* -XX:CompileCommand=compileonly,Test1b::test -Xbatch -XX:+TraceNewVectors Test1b.java
Result:
Exception in thread "main" java.lang.RuntimeException: errors: 2032
at Test1b.compare(Test1b.java:41)
at Test1b.main(Test1b.java:20)
- duplicates
-
JDK-8337817 Incorrect result computation in vector tests with MaxVectorSize=8
- Closed
- relates to
-
JDK-8333840 C2 SuperWord: wrong result for MulAddS2I when inputs permuted
- Resolved
- links to
-
Commit(master) openjdk/jdk/c27a8c8c
-
Review(master) openjdk/jdk/20539