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

Optimize Xor

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: