1). x ^ x ==> 0
2). Const ^ x ==> x ^ Const, so that GVN could replace with the pre-existed node.
3). x ^ y ==> x, if y is constant zero.
4). x ^ y ==> ~x, if y is constant bit mask value.
See https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2020-November/041798.html for more detail.
2). Const ^ x ==> x ^ Const, so that GVN could replace with the pre-existed node.
3). x ^ y ==> x, if y is constant zero.
4). x ^ y ==> ~x, if y is constant bit mask value.
See https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2020-November/041798.html for more detail.
- relates to
-
JDK-8347645 C2: XOR bounded value handling blocks constant folding
-
- Open
-
-
JDK-8318049 C2: assert(!failure) failed: Missed optimization opportunity in PhaseIterGVN
-
- Resolved
-