6684385: Loop unswitching crashes without LoopNode

Without LoopNode, exit early from loop unswitching and partial peeling

Reviewed-by: kvn, never, sgoldman
This commit is contained in:
Chuck Rasbold 2008-04-09 09:25:45 -07:00
parent c89e39d40a
commit ba411c2466
2 changed files with 6 additions and 0 deletions

View file

@ -2257,6 +2257,9 @@ bool PhaseIdealLoop::is_valid_clone_loop_form( IdealLoopTree *loop, Node_List& p
//
bool PhaseIdealLoop::partial_peel( IdealLoopTree *loop, Node_List &old_new ) {
if (!loop->_head->is_Loop()) {
return false; }
LoopNode *head = loop->_head->as_Loop();
if (head->is_partial_peel_loop() || head->partial_peel_has_failed()) {