hotspot/src/share/vm/opto/ifnode.cpp
changeset 34181 663d662fdff0
parent 34177 e19e45b065c6
parent 34180 f0ec91019db2
child 35551 36ef3841fb34
--- a/hotspot/src/share/vm/opto/ifnode.cpp	Mon Nov 16 10:54:47 2015 +0100
+++ b/hotspot/src/share/vm/opto/ifnode.cpp	Mon Nov 16 11:58:31 2015 +0000
@@ -485,7 +485,7 @@
     return NULL;
   }
   if (l->is_top())  return NULL;   // Top input means dead test
-  if (r->Opcode() != Op_LoadRange)  return NULL;
+  if (r->Opcode() != Op_LoadRange && !is_RangeCheck())  return NULL;
 
   // We have recognized one of these forms:
   //  Flip 1:  If (Bool[<] CmpU(l, LoadRange)) ...
@@ -525,9 +525,9 @@
     return 0;
   } else if (l->Opcode() == Op_AddI) {
     if ((off = l->in(1)->find_int_con(0)) != 0) {
-      ind = l->in(2);
+      ind = l->in(2)->uncast();
     } else if ((off = l->in(2)->find_int_con(0)) != 0) {
-      ind = l->in(1);
+      ind = l->in(1)->uncast();
     }
   } else if ((off = l->find_int_con(-1)) >= 0) {
     // constant offset with no variable index