Mercurial > hg > truffle
diff src/share/vm/opto/loopopts.cpp @ 108:a761c2d3b76a
6684385: Loop unswitching crashes without LoopNode
Summary: Without LoopNode, exit early from loop unswitching and partial peeling
Reviewed-by: kvn, never, sgoldman
author | rasbold |
---|---|
date | Wed, 09 Apr 2008 09:25:45 -0700 |
parents | 8bb88f9877e5 |
children | c436414a719e |
line wrap: on
line diff
--- a/src/share/vm/opto/loopopts.cpp Tue Apr 08 12:23:15 2008 -0400 +++ b/src/share/vm/opto/loopopts.cpp Wed Apr 09 09:25:45 2008 -0700 @@ -2257,6 +2257,9 @@ // 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()) {