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

PhaseIdealLoop::is_scaled_iv_plus_offset() does not match AddI

    XMLWordPrintable

    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 &&

          Attachments

            Issue Links

              Activity

                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: