Mercurial > hg > truffle
diff src/share/vm/opto/ifnode.cpp @ 3840:4e761e7e6e12
7070134: Hotspot crashes with sigsegv from PorterStemmer
Summary: Do not move data nodes which are attached to a predicate test to a dominating test.
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 26 Jul 2011 19:35:23 -0700 |
parents | f879eafd5835 |
children | c96c3eb1efae |
line wrap: on
line diff
--- a/src/share/vm/opto/ifnode.cpp Thu Jul 21 11:25:07 2011 -0700 +++ b/src/share/vm/opto/ifnode.cpp Tue Jul 26 19:35:23 2011 -0700 @@ -1009,6 +1009,13 @@ int prev_op = prev_dom->Opcode(); Node *top = igvn->C->top(); // Shortcut to top + // Loop predicates may have depending checks which should not + // be skipped. For example, range check predicate has two checks + // for lower and upper bounds. + ProjNode* unc_proj = proj_out(1 - prev_dom->as_Proj()->_con)->as_Proj(); + if (PhaseIdealLoop::is_uncommon_trap_proj(unc_proj, Deoptimization::Reason_predicate)) + prev_dom = idom; + // Now walk the current IfNode's projections. // Loop ends when 'this' has no more uses. for (DUIterator_Last imin, i = last_outs(imin); i >= imin; --i) { @@ -1019,9 +1026,9 @@ // or TOP if the dominating projection is of opposite type. // Data-target will be used as the new control edge for the non-CFG // nodes like Casts and Loads. - Node *data_target = (ifp->Opcode() == prev_op ) ? prev_dom : top; + Node *data_target = (ifp->Opcode() == prev_op) ? prev_dom : top; // Control-target is just the If's immediate dominator or TOP. - Node *ctrl_target = (ifp->Opcode() == prev_op ) ? idom : top; + Node *ctrl_target = (ifp->Opcode() == prev_op) ? idom : top; // For each child of an IfTrue/IfFalse projection, reroute. // Loop ends when projection has no more uses.