When doing sign comparisons (i.e., x < 0; x >= 0), some binary operator input nodes can be skipped, only relying on one input of that node.
Common patterns like (x | y) < 0 can be simplified to x < 0 if y is known to be nonnegative. Similar optimizations can be made for And, Max, and Min nodes.
For Xor, a common pattern is (x ^ y) < 0, which can also be simplified but requires a negation of the test depending on the known value.
Common patterns like (x | y) < 0 can be simplified to x < 0 if y is known to be nonnegative. Similar optimizations can be made for And, Max, and Min nodes.
For Xor, a common pattern is (x ^ y) < 0, which can also be simplified but requires a negation of the test depending on the known value.
- links to
-
Review(master)
openjdk/jdk/28782