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