--- a/hotspot/src/share/vm/opto/loopTransform.cpp Mon Nov 09 22:43:30 2015 +0000
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp Mon Nov 09 11:28:31 2015 +0100
@@ -290,7 +290,7 @@
if (ctrl->is_top())
return false; // Found dead test on live IF? No peeling!
// Standard IF only has one input value to check for loop invariance
- assert( test->Opcode() == Op_If || test->Opcode() == Op_CountedLoopEnd, "Check this code when new subtype is added");
+ assert(test->Opcode() == Op_If || test->Opcode() == Op_CountedLoopEnd || test->Opcode() == Op_RangeCheck, "Check this code when new subtype is added");
// Condition is not a member of this loop?
if( !is_member(phase->get_loop(ctrl)) &&
is_loop_exit(test) )
@@ -856,7 +856,8 @@
// loop-invariant.
for (uint i = 0; i < _body.size(); i++) {
Node *iff = _body[i];
- if (iff->Opcode() == Op_If) { // Test?
+ if (iff->Opcode() == Op_If ||
+ iff->Opcode() == Op_RangeCheck) { // Test?
// Comparing trip+off vs limit
Node *bol = iff->in(1);
@@ -2035,8 +2036,8 @@
// loop-invariant.
for( uint i = 0; i < loop->_body.size(); i++ ) {
Node *iff = loop->_body[i];
- if( iff->Opcode() == Op_If ) { // Test?
-
+ if (iff->Opcode() == Op_If ||
+ iff->Opcode() == Op_RangeCheck) { // Test?
// Test is an IfNode, has 2 projections. If BOTH are in the loop
// we need loop unswitching instead of iteration splitting.
Node *exit = loop->is_loop_exit(iff);