New addnode ideal optimization: converting "x + x" into "x << 1"

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 19
    • Affects Version/s: 18
    • Component/s: hotspot
    • b04
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      A new ideal optimization can be introduced for addnode: converting "x + x" into "x << 1".

      // Convert "x + x" into "x << 1"
      if (in1 == in2) {
        return new LShiftINode(in1, phase->intcon(1));
      }

      Will submit a pull request associated with this.


            Assignee:
            Vladimir Kozlov
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: