JDK-8261008 : Optimize Xor
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2021-02-03
  • Updated: 2023-10-23
  • Resolved: 2021-03-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b13Fixed
Related Reports
Relates :  
Description
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.
Comments
Changeset: 23ee60d1 Author: Eric Liu <eric.c.liu@arm.com> Committer: Vladimir Kozlov <kvn@openjdk.org> Date: 2021-03-06 08:52:35 +0000 URL: https://git.openjdk.java.net/jdk/commit/23ee60d1
06-03-2021