hotspot/src/share/vm/opto/superword.cpp
changeset 35574 2b25eb88c8d6
parent 35549 3415401a6b6e
child 36066 60ce66ce3c76
--- a/hotspot/src/share/vm/opto/superword.cpp	Mon Jan 18 08:34:14 2016 +0100
+++ b/hotspot/src/share/vm/opto/superword.cpp	Mon Jan 18 08:40:25 2016 +0100
@@ -3343,6 +3343,11 @@
       return true;
     }
   } else if (opc == Op_ConvI2L) {
+    if (n->in(1)->Opcode() == Op_CastII &&
+        n->in(1)->as_CastII()->has_range_check()) {
+      // Skip range check dependent CastII nodes
+      n = n->in(1);
+    }
     if (scaled_iv_plus_offset(n->in(1))) {
       NOT_PRODUCT(_tracer.scaled_iv_7(n);)
       return true;
@@ -3437,6 +3442,12 @@
   if (invariant(n)) {
     if (opc == Op_ConvI2L) {
       n = n->in(1);
+      if (n->Opcode() == Op_CastII &&
+          n->as_CastII()->has_range_check()) {
+        // Skip range check dependent CastII nodes
+        assert(invariant(n), "sanity");
+        n = n->in(1);
+      }
     }
     if (n->bottom_type()->isa_int()) {
       _negate_invar = negate;