changeset 9805:0e9d64117522

8145754: PhaseIdealLoop::is_scaled_iv_plus_offset() does not match AddI Summary: is_scaled_iv_plus_offset() should handle AddI nodes with scaled iv as second input. Reviewed-by: kvn
author thartmann
date Mon, 21 Dec 2015 10:14:26 +0100
parents 6703a8a0b2d9
children 21689239c407
files src/share/vm/opto/loopTransform.cpp
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/loopTransform.cpp	Sat Dec 19 19:06:02 2015 +0100
+++ b/src/share/vm/opto/loopTransform.cpp	Mon Dec 21 10:14:26 2015 +0100
@@ -1911,6 +1911,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 &&