src/share/vm/opto/ifnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/ifnode.cpp	Tue Jul 26 12:22:03 2011
--- new/src/share/vm/opto/ifnode.cpp	Tue Jul 26 12:22:03 2011

*** 1007,1016 **** --- 1007,1023 ---- Node *idom = in(0); // Need opcode to decide which way 'this' test goes 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) { Node *ifp = last_out(i); // Get IfTrue/IfFalse igvn->add_users_to_worklist(ifp);
*** 1017,1029 **** --- 1024,1036 ---- // Check which projection it is and set target. // Data-target is either the dominating projection of the same type // 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; // Control-target is just the If's immediate dominator or 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. for (DUIterator_Last jmin, j = ifp->last_outs(jmin); j >= jmin; --j) { Node* s = ifp->last_out(j); // Get child of IfTrue/IfFalse

src/share/vm/opto/ifnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File