src/share/vm/opto/loopTransform.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/loopTransform.cpp	Mon Feb 15 16:32:27 2016
--- new/src/share/vm/opto/loopTransform.cpp	Mon Feb 15 16:32:27 2016

*** 1452,1468 **** --- 1452,1481 ---- Node *opaq = NULL; if (adjust_min_trip) { // If not maximally unrolling, need adjustment // Search for zero-trip guard. assert( loop_head->is_main_loop(), "" ); assert( ctrl->Opcode() == Op_IfTrue || ctrl->Opcode() == Op_IfFalse, "" ); + // In some cases, the shape of the graph does not match the shape + // outlined below (because other optimizations, e.g., split-if and loop + // peeling have transformed it). Loop unrolling is not possible in these + // cases, so give the attempt to unroll the loop (but still continue + // compilation). + if (ctrl->Opcode() != Op_IfTrue && ctrl->Opcode() != Op_IfFalse) { + return; + } Node *iff = ctrl->in(0); assert( iff->Opcode() == Op_If, "" ); + if (iff->Opcode() != Op_If) { + return; + } Node *bol = iff->in(1); assert( bol->Opcode() == Op_Bool, "" ); + if (bol->Opcode() != Op_Bool) { + return; + } Node *cmp = bol->in(1); assert( cmp->Opcode() == Op_CmpI, "" ); + if (cmp->Opcode() != Op_CmpI) { + return; + } opaq = cmp->in(2); // Occasionally it's possible for a zero-trip guard Opaque1 node to be // optimized away and then another round of loop opts attempted. // We can not optimize this particular loop in that case. if (opaq->Opcode() != Op_Opaque1)

src/share/vm/opto/loopTransform.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File