8143307: Crash in C2 local code motion

Reviewed-by: kvn
This commit is contained in:
Goetz Lindenmaier 2015-11-19 12:53:33 +01:00
parent 0aebabc831
commit 975140c530

@ -498,9 +498,13 @@ Node* PhaseCFG::select(
continue;
// Schedule IV increment last.
if (e->is_Mach() && e->as_Mach()->ideal_Opcode() == Op_CountedLoopEnd &&
e->in(1)->in(1) == n && n->is_iteratively_computed())
continue;
if (e->is_Mach() && e->as_Mach()->ideal_Opcode() == Op_CountedLoopEnd) {
// Cmp might be matched into CountedLoopEnd node.
Node *cmp = (e->in(1)->ideal_reg() == Op_RegFlags) ? e->in(1) : e;
if (cmp->req() > 1 && cmp->in(1) == n && n->is_iteratively_computed()) {
continue;
}
}
uint n_choice = 2;