-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P3
-
Affects Version/s: 26
-
Component/s: hotspot
-
b20
If the attached test case is run with StressIGVN for a large enough number of iterations, execution fails due to an incorrect result.
What I observe after superword is that, in the vectorized loop, one node is a StoreI with address of the shape:
(AddP base (AddP base (Phi#1 ...) (Phi#2 ... ) 16)
Phi#2 has constant 4 as input 1, and some expression that depends on some other Phi on the backedge. However, Phi#2's type is set to 4 by superword which causes it to constant fold and the store to always write at some fixed offset.
I reproduce this with:
$ for i in `seq 100`; do echo $i; ~/jdk-jdk/build/linux-x86_64-server-fastdebug/images/jdk/bin/java -XX:-TieredCompilation -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -XX:CompileOnly=TestBrokenSuperWord::test1 -XX:CompileCommand=dontinline,TestBrokenSuperWord::notInlined -XX:PartialPeelNewPhiDelta=1 -XX:+StressIGVN TestBrokenSuperWord || break; done
Usually needs fewer than 100 iterations to reproduce but not always.
What I observe after superword is that, in the vectorized loop, one node is a StoreI with address of the shape:
(AddP base (AddP base (Phi#1 ...) (Phi#2 ... ) 16)
Phi#2 has constant 4 as input 1, and some expression that depends on some other Phi on the backedge. However, Phi#2's type is set to 4 by superword which causes it to constant fold and the store to always write at some fixed offset.
I reproduce this with:
$ for i in `seq 100`; do echo $i; ~/jdk-jdk/build/linux-x86_64-server-fastdebug/images/jdk/bin/java -XX:-TieredCompilation -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -XX:CompileOnly=TestBrokenSuperWord::test1 -XX:CompileCommand=dontinline,TestBrokenSuperWord::notInlined -XX:PartialPeelNewPhiDelta=1 -XX:+StressIGVN TestBrokenSuperWord || break; done
Usually needs fewer than 100 iterations to reproduce but not always.
- caused by
-
JDK-8369448 C2 SuperWord: refactor VTransform to do move_unordered_reduction_out_of_loop during VTransform::optimize
-
- Resolved
-
- duplicates
-
JDK-8371472 C2 compilation fails with "Error mixing types: vectory<I,8> and int:0"
-
- Closed
-
- links to
-
Review(master)
openjdk/jdk/28113