mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
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:
parent
c89e39d40a
commit
ba411c2466
2 changed files with 6 additions and 0 deletions
|
@ -51,6 +51,9 @@ bool IdealLoopTree::policy_unswitching( PhaseIdealLoop *phase ) const {
|
|||
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue