src/share/vm/opto/loopopts.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/opto/loopopts.cpp
src/share/vm/opto/loopopts.cpp
Print this page
rev 5462 : 8048170: Test closed/java/text/Normalizer/ConformanceTest.java failed
Summary: PhaseIdealLoop::split_if_with_blocks_post() shoulnd't reorder range checks adjusted by range check smearing
Reviewed-by: kvn, jrose
*** 232,243 ****
// 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 = iff->as_If()->proj_out(1 - dp->as_Proj()->_con)->as_Proj();
if (exclude_loop_predicate &&
! is_uncommon_trap_proj(unc_proj, Deoptimization::Reason_predicate))
return; // Let IGVN transformation change control dependence.
IdealLoopTree *old_loop = get_loop(dp);
for (DUIterator_Fast imax, i = dp->fast_outs(imax); i < imax; i++) {
Node* cd = dp->fast_out(i); // Control-dependent node
--- 232,248 ----
// 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 = iff->as_If()->proj_out(1 - dp->as_Proj()->_con)->as_Proj();
if (exclude_loop_predicate &&
! (is_uncommon_trap_proj(unc_proj, Deoptimization::Reason_predicate) ||
! is_uncommon_trap_proj(unc_proj, Deoptimization::Reason_range_check))) {
! // If this is a range check (IfNode::is_range_check), do not
! // reorder because Compile::allow_range_check_smearing might have
! // changed the check.
return; // Let IGVN transformation change control dependence.
+ }
IdealLoopTree *old_loop = get_loop(dp);
for (DUIterator_Fast imax, i = dp->fast_outs(imax); i < imax; i++) {
Node* cd = dp->fast_out(i); // Control-dependent node
*** 886,912 ****
// Check for an IF ready to split; one that has its
// condition codes input coming from a Phi at the block start.
int n_op = n->Opcode();
// Check for an IF being dominated by another IF same test
! if( n_op == Op_If ) {
Node *bol = n->in(1);
uint max = bol->outcnt();
// Check for same test used more than once?
! if( n_op == Op_If && max > 1 && bol->is_Bool() ) {
// Search up IDOMs to see if this IF is dominated.
Node *cutoff = get_ctrl(bol);
// Now search up IDOMs till cutoff, looking for a dominating test
Node *prevdom = n;
Node *dom = idom(prevdom);
! while( dom != cutoff ) {
! if( dom->req() > 1 && dom->in(1) == bol && prevdom->in(0) == dom ) {
// Replace the dominated test with an obvious true or false.
// Place it on the IGVN worklist for later cleanup.
C->set_major_progress();
! dominated_by( prevdom, n, false, true );
#ifndef PRODUCT
if( VerifyLoopOptimizations ) verify();
#endif
return;
}
--- 891,917 ----
// Check for an IF ready to split; one that has its
// condition codes input coming from a Phi at the block start.
int n_op = n->Opcode();
// Check for an IF being dominated by another IF same test
! if (n_op == Op_If) {
Node *bol = n->in(1);
uint max = bol->outcnt();
// Check for same test used more than once?
! if (max > 1 && bol->is_Bool()) {
// Search up IDOMs to see if this IF is dominated.
Node *cutoff = get_ctrl(bol);
// Now search up IDOMs till cutoff, looking for a dominating test
Node *prevdom = n;
Node *dom = idom(prevdom);
! while (dom != cutoff) {
! if (dom->req() > 1 && dom->in(1) == bol && prevdom->in(0) == dom) {
// Replace the dominated test with an obvious true or false.
// Place it on the IGVN worklist for later cleanup.
C->set_major_progress();
! dominated_by(prevdom, n, false, true);
#ifndef PRODUCT
if( VerifyLoopOptimizations ) verify();
#endif
return;
}
src/share/vm/opto/loopopts.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File