OpenJDK / portola / portola
changeset 34210:2dafc56da253
8143307: Crash in C2 local code motion
Reviewed-by: kvn
author | goetz |
---|---|
date | Thu, 19 Nov 2015 12:53:33 +0100 |
parents | abe570308c14 |
children | d25c2fc1e248 |
files | hotspot/src/share/vm/opto/lcm.cpp |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hotspot/src/share/vm/opto/lcm.cpp Mon Nov 23 15:16:19 2015 +0100 +++ b/hotspot/src/share/vm/opto/lcm.cpp Thu Nov 19 12:53:33 2015 +0100 @@ -498,9 +498,13 @@ 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;