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

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

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 19
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b04
    • CPU:
      generic
    • OS:
      generic

      Description

      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.


        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: