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

PhaseIdealLoop::is_scaled_iv_plus_offset() does not match AddI

    Details

    • Subcomponent:
    • Resolved In Build:
      b103

      Backports

        Description

        PhaseIdealLoop::is_scaled_iv_plus_offset() returns false if 'exp' is an AddI node with the scaled iv as second input because is_scaled_iv() is only invoked for exp->in(1). We should fix it like this:

        --- a/src/share/vm/opto/loopTransform.cpp Fri Dec 18 12:51:19 2015 +0100
        +++ b/src/share/vm/opto/loopTransform.cpp Fri Dec 18 12:57:39 2015 +0100
        @@ -1913,6 +1913,12 @@
               }
               return true;
             }
        + if (is_scaled_iv(exp->in(2), iv, p_scale)) {
        + if (p_offset != NULL) {
        + *p_offset = exp->in(1);
        + }
        + return true;
        + }
             if (exp->in(2)->is_Con()) {
               Node* offset2 = NULL;
               if (depth < 2 &&

          Activity

          Hide
          thartmann Tobias Hartmann added a comment -
          ILW = disables optimizations, easy to reproduce, no workaround = MHH = P2
          Show
          thartmann Tobias Hartmann added a comment - ILW = disables optimizations, easy to reproduce, no workaround = MHH = P2
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/0e9d64117522
          User: thartmann
          Date: 2015-12-21 10:34:13 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/0e9d64117522 User: thartmann Date: 2015-12-21 10:34:13 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/0e9d64117522
          User: lana
          Date: 2016-01-27 21:42:23 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/0e9d64117522 User: lana Date: 2016-01-27 21:42:23 +0000

            People

            • Assignee:
              thartmann Tobias Hartmann
              Reporter:
              thartmann Tobias Hartmann
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: