Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8056399 | emb-9 | Tobias Hartmann | P4 | Resolved | Fixed | b29 |
This optimization might also be beneficial on some signed comparisons, notably (r1+r2)==0 where r1 and r2 are both [1..maxint].
The problem rise when result of AddI(SubI) may overflow signed integer value.
Let say the input type is [256, maxint] then adding +128 will create 2 ranges due to
overflow: [minint, minint+127] and [384, maxint].
C2 type system keep only 1 type range and as result it use general [minint, maxint] type
for this case which we can't optimize.
Make 2 separate type ranges based on types of AddI(SubI) inputs and compare results of their compare. If results are the same CmpI node can be optimized. Note, only signed equality can be optimized this way.
- backported by
-
JDK-8056399 Optimize signed integer comparison
-
- Resolved
-
- relates to
-
JDK-8042786 Proper fix for 8032566
-
- Resolved
-
-
JDK-8001436 C2: Implement bitwise constant propagation
-
- Open
-