< prev index next >
src/hotspot/share/opto/ifnode.cpp
Print this page
*** 115,124 ****
--- 115,125 ----
if( !t->singleton() ) return NULL;
// No intervening control, like a simple Call
Node *r = iff->in(0);
if( !r->is_Region() ) return NULL;
+ if (r->is_Loop() && r->in(LoopNode::LoopBackControl)->is_top()) return NULL; // going away anyway
if( phi->region() != r ) return NULL;
// No other users of the cmp/bool
if (b->outcnt() != 1 || cmp->outcnt() != 1) {
//tty->print_cr("many users of cmp/bool");
return NULL;
*** 1616,1625 ****
--- 1617,1636 ----
// CountedLoopEnds want the back-control test to be TRUE, irregardless of
// whether they are testing a 'gt' or 'lt' condition. The 'gt' condition
// happens in count-down loops
if (iff->is_CountedLoopEnd()) return NULL;
+ Node* proj_true = iff->proj_out(true);
+ if (proj_true->outcnt() == 1) {
+ Node* c = proj_true->unique_out();
+ // Leave test of outer strip mined loop alone
+ if (c != NULL && c->is_Loop() &&
+ c->in(LoopNode::LoopBackControl) == proj_true &&
+ c->as_Loop()->is_strip_mined()) {
+ return NULL;
+ }
+ }
if (!iff->in(1)->is_Bool()) return NULL; // Happens for partially optimized IF tests
BoolNode *b = iff->in(1)->as_Bool();
BoolTest bt = b->_test;
// Test already in good order?
if( bt.is_canonical() )
< prev index next >