-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: 26
-
Component/s: hotspot
URShiftINode::Ideal uses phase->type(shl->in(2)) == t2 to check if LShift and URShift have matching shift counts. During IGVN, mask_and_replace_shift_amount normalizes shift counts (e.g., -1 -> 31), but LShift and URShift may be processed at different times, leaving them with different constant nodes for the same effective count. The type pointer comparison then fails and the (X << C) >>> C -> X & mask optimization is missed.
URShiftLNode affected too. Same root cause as JDK-8374798.
repro: java -XX:+StressIGVN -XX:+StressCCP -XX:VerifyIterativeGVN=0100 -Xcomp -XX:-TieredCompilation -XX:CompileCommand=compileonly,*URShiftOpt*::mainTest* URShiftOpt.java
URShiftLNode affected too. Same root cause as JDK-8374798.
repro: java -XX:+StressIGVN -XX:+StressCCP -XX:VerifyIterativeGVN=0100 -Xcomp -XX:-TieredCompilation -XX:CompileCommand=compileonly,*URShiftOpt*::mainTest* URShiftOpt.java
- relates to
-
JDK-8374798 C2: Missing Identity optimization opportunity with RShiftI and LShiftI
-
- Open
-
- links to
-
Review(master)
openjdk/jdk/29613