Fri, 19 Feb 2010 13:06:11 -0800
6927049: assert(is_Loop(),"invalid node class")
Reviewed-by: kvn
src/share/vm/opto/loopTransform.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/opto/loopTransform.cpp Fri Feb 19 10:04:16 2010 -0800 1.2 +++ b/src/share/vm/opto/loopTransform.cpp Fri Feb 19 13:06:11 2010 -0800 1.3 @@ -2117,6 +2117,18 @@ 1.4 bool PhaseIdealLoop::loop_predication_impl(IdealLoopTree *loop) { 1.5 if (!UseLoopPredicate) return false; 1.6 1.7 + if (!loop->_head->is_Loop()) { 1.8 + // Could be a simple region when irreducible loops are present. 1.9 + return false; 1.10 + } 1.11 + 1.12 + CountedLoopNode *cl = NULL; 1.13 + if (loop->_head->is_CountedLoop()) { 1.14 + cl = loop->_head->as_CountedLoop(); 1.15 + // do nothing for iteration-splitted loops 1.16 + if (!cl->is_normal_loop()) return false; 1.17 + } 1.18 + 1.19 // Too many traps seen? 1.20 bool tmt = C->too_many_traps(C->method(), 0, Deoptimization::Reason_predicate); 1.21 int tc = C->trap_count(Deoptimization::Reason_predicate); 1.22 @@ -2129,13 +2141,6 @@ 1.23 return false; 1.24 } 1.25 1.26 - CountedLoopNode *cl = NULL; 1.27 - if (loop->_head->is_CountedLoop()) { 1.28 - cl = loop->_head->as_CountedLoop(); 1.29 - // do nothing for iteration-splitted loops 1.30 - if(!cl->is_normal_loop()) return false; 1.31 - } 1.32 - 1.33 LoopNode *lpn = loop->_head->as_Loop(); 1.34 Node* entry = lpn->in(LoopNode::EntryControl); 1.35