If divisor is a constant and not equal to 0, it's possible to deduce the final bound of ModXNode given that the following rules:
x % -y ==> [0, y - 1]
x % y ==> [0, y - 1]
-x % y ==> [-y + 1, 0]
-x % -y ==> [-y + 1, 0]
x % -y ==> [0, y - 1]
x % y ==> [0, y - 1]
-x % y ==> [-y + 1, 0]
-x % -y ==> [-y + 1, 0]
- relates to
-
JDK-8267239 C1: RangeCheckElimination for % operator if divisor is IntConstant
-
- Resolved
-
- links to
-
Review openjdk/jdk/4179