Mercurial > hg > graal-jvmci-8
diff src/share/vm/opto/loopUnswitch.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 | a61af66fc99e |
children | d1605aabd0a1 8d191a7697e2 |
line wrap: on
line diff
--- a/src/share/vm/opto/loopUnswitch.cpp Tue Apr 08 12:23:15 2008 -0400 +++ b/src/share/vm/opto/loopUnswitch.cpp Wed Apr 09 09:25:45 2008 -0700 @@ -51,6 +51,9 @@ if( !LoopUnswitching ) { return false; } + if (!_head->is_Loop()) { + return false; + } uint nodes_left = MaxNodeLimit - phase->C->unique(); if (2 * _body.size() > nodes_left) { return false; // Too speculative if running low on nodes.