Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8261008

Optimize Xor

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • hotspot
    • b13
    • generic
    • generic

    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.

      Attachments

        Issue Links

          Activity

            People

              eliu Eric Liu
              eliu Eric Liu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: