src/share/vm/opto/loopnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 7077439 Cdiff src/share/vm/opto/loopnode.cpp

src/share/vm/opto/loopnode.cpp

Print this page

        

*** 687,696 **** --- 687,697 ---- //----------------------exact_limit------------------------------------------- Node* PhaseIdealLoop::exact_limit( IdealLoopTree *loop ) { assert(loop->_head->is_CountedLoop(), ""); CountedLoopNode *cl = loop->_head->as_CountedLoop(); + assert(cl->is_valid_counted_loop(), ""); if (!LoopLimitCheck || ABS(cl->stride_con()) == 1 || cl->limit()->Opcode() == Op_LoopLimit) { // Old code has exact limit (it could be incorrect in case of int overflow). // Loop limit is exact with stride == 1. And loop may already have exact limit.
*** 1606,1623 **** //---------------------------replace_parallel_iv------------------------------- // Replace parallel induction variable (parallel to trip counter) void PhaseIdealLoop::replace_parallel_iv(IdealLoopTree *loop) { assert(loop->_head->is_CountedLoop(), ""); CountedLoopNode *cl = loop->_head->as_CountedLoop(); Node *incr = cl->incr(); if (incr == NULL) return; // Dead loop? Node *init = cl->init_trip(); Node *phi = cl->phi(); - // protect against stride not being a constant - if (!cl->stride_is_con()) - return; int stride_con = cl->stride_con(); PhaseGVN *gvn = &_igvn; // Visit all children, looking for Phis --- 1607,1623 ---- //---------------------------replace_parallel_iv------------------------------- // Replace parallel induction variable (parallel to trip counter) void PhaseIdealLoop::replace_parallel_iv(IdealLoopTree *loop) { assert(loop->_head->is_CountedLoop(), ""); CountedLoopNode *cl = loop->_head->as_CountedLoop(); + if (!cl->is_valid_counted_loop()) + return; // skip malformed counted loop Node *incr = cl->incr(); if (incr == NULL) return; // Dead loop? Node *init = cl->init_trip(); Node *phi = cl->phi(); int stride_con = cl->stride_con(); PhaseGVN *gvn = &_igvn; // Visit all children, looking for Phis
src/share/vm/opto/loopnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File