The implementation of CmpUNode::sub returns CC_LE if the first input is a constant 0, and returns CC_NE if the inputs do not intersect. These can result in monotonicity violations. For example. given r = CmpU(x, y)
At the first iteration, type(x) = {0}, type(y) = {-1, 1}. CmpUNode::sub returns CC_LE.
At the next iteration, type(x) = {0, 2), type(y) = {-1, 1}. CmpUNode::sub returns CC_NE.
As CC_LE is not a subset of CC_NE, monotonicity is violated.
At the first iteration, type(x) = {0}, type(y) = {-1, 1}. CmpUNode::sub returns CC_LE.
At the next iteration, type(x) = {0, 2), type(y) = {-1, 1}. CmpUNode::sub returns CC_NE.
As CC_LE is not a subset of CC_NE, monotonicity is violated.
- relates to
-
JDK-8360561 PhaseIdealLoop::create_new_if_for_predicate hits "must be a uct if pattern" assert
-
- Resolved
-
-
JDK-8315066 Add unsigned bounds and known bits to TypeInt/Long
-
- Resolved
-
- links to
-
Review(master)
openjdk/jdk/29308