The refactor in JDK-8327381 moved the BoolNode::Value_cmpu_and_mask transformations from BoolNode::Ideal to BoolNode::Value. After that, we found that the transformation was leaving the CmpU and Bool types in an inconsistent state.
If we simply adjust the CmpU type as TypeInt::CC_LE (case 1a) or TypeInt::CC_LT (case 1b) [1], the BoolNode type will automatically be adjusted by the types' propagation of BoolTest::cc2logical [2][3].
[1] https://github.com/openjdk/jdk/blob/jdk-26+8/src/hotspot/share/opto/type.cpp#L495-L500
[2] https://github.com/openjdk/jdk/blob/jdk-26+8/src/hotspot/share/opto/subnode.cpp#L1356-L1370
[3] https://github.com/openjdk/jdk/blob/jdk-26+8/src/hotspot/share/opto/subnode.cpp#L1910
If we simply adjust the CmpU type as TypeInt::CC_LE (case 1a) or TypeInt::CC_LT (case 1b) [1], the BoolNode type will automatically be adjusted by the types' propagation of BoolTest::cc2logical [2][3].
[1] https://github.com/openjdk/jdk/blob/jdk-26+8/src/hotspot/share/opto/type.cpp#L495-L500
[2] https://github.com/openjdk/jdk/blob/jdk-26+8/src/hotspot/share/opto/subnode.cpp#L1356-L1370
[3] https://github.com/openjdk/jdk/blob/jdk-26+8/src/hotspot/share/opto/subnode.cpp#L1910
- caused by
-
JDK-8327381 Refactor type-improving transformations in BoolNode::Ideal to BoolNode::Value
-
- Resolved
-
- links to
-
Review(master) openjdk/jdk/26666