-
Bug
-
Resolution: Fixed
-
P2
-
19, 20
-
b28
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8288775 | 20 | Christian Hagedorn | P2 | Resolved | Fixed | b03 |
JDK-8291267 | 19.0.2 | Christian Hagedorn | P2 | Resolved | Fixed | b01 |
JDK-8291099 | 19.0.1 | Christian Hagedorn | P2 | Resolved | Fixed | b04 |
(1 + 1) << 63 is converted to (1 << 1) << 63
= 1 << 64 = 1 << 0 [according to the Java spec we only consider the six lowest-order bits of the right-hand operand (i.e. 64 = 0b10000000 & 0b0111111 = 0)]
= 1
while
(1 + 1) << 63 = 2 << 63 = 0
which is different. We should exclude the optimization added by
Integer shifts are note affected since we only apply the optimization for shift values smaller than 16.
This was found by the Java Fuzzer.
- backported by
-
JDK-8288775 C2: LShiftLNode::Ideal produces wrong result after JDK-8278114
-
- Resolved
-
-
JDK-8291099 C2: LShiftLNode::Ideal produces wrong result after JDK-8278114
-
- Resolved
-
-
JDK-8291267 C2: LShiftLNode::Ideal produces wrong result after JDK-8278114
-
- Resolved
-
- relates to
-
JDK-8278114 New addnode ideal optimization: converting "x + x" into "x << 1"
-
- Resolved
-
(1 links to)