--- old/src/share/vm/opto/subnode.cpp 2012-11-12 10:52:09.708641960 -0800 +++ new/src/share/vm/opto/subnode.cpp 2012-11-12 10:52:09.480644827 -0800 @@ -1078,16 +1078,6 @@ return (_test._test == b->_test._test); } -//------------------------------clone_cmp-------------------------------------- -// Clone a compare/bool tree -static Node *clone_cmp( Node *cmp, Node *cmp1, Node *cmp2, PhaseGVN *gvn, BoolTest::mask test ) { - Node *ncmp = cmp->clone(); - ncmp->set_req(1,cmp1); - ncmp->set_req(2,cmp2); - ncmp = gvn->transform( ncmp ); - return new (gvn->C) BoolNode( ncmp, test ); -} - //-------------------------------make_predicate-------------------------------- Node* BoolNode::make_predicate(Node* test_value, PhaseGVN* phase) { if (test_value->is_Con()) return test_value; @@ -1216,51 +1206,6 @@ return new (phase->C) BoolNode( ncmp, _test.commute() ); } - // The transformation below is not valid for either signed or unsigned - // comparisons due to wraparound concerns at MAX_VALUE and MIN_VALUE. - // This transformation can be resurrected when we are able to - // make inferences about the range of values being subtracted from - // (or added to) relative to the wraparound point. - // - // // Remove +/-1's if possible. - // // "X <= Y-1" becomes "X < Y" - // // "X+1 <= Y" becomes "X < Y" - // // "X < Y+1" becomes "X <= Y" - // // "X-1 < Y" becomes "X <= Y" - // // Do not this to compares off of the counted-loop-end. These guys are - // // checking the trip counter and they want to use the post-incremented - // // counter. If they use the PRE-incremented counter, then the counter has - // // to be incremented in a private block on a loop backedge. - // if( du && du->cnt(this) && du->out(this)[0]->Opcode() == Op_CountedLoopEnd ) - // return NULL; - // #ifndef PRODUCT - // // Do not do this in a wash GVN pass during verification. - // // Gets triggered by too many simple optimizations to be bothered with - // // re-trying it again and again. - // if( !phase->allow_progress() ) return NULL; - // #endif - // // Not valid for unsigned compare because of corner cases in involving zero. - // // For example, replacing "X-1 Opcode() == Op_CmpU ) return NULL; - // int cmp2_op = cmp2->Opcode(); - // if( _test._test == BoolTest::le ) { - // if( cmp1_op == Op_AddI && - // phase->type( cmp1->in(2) ) == TypeInt::ONE ) - // return clone_cmp( cmp, cmp1->in(1), cmp2, phase, BoolTest::lt ); - // else if( cmp2_op == Op_AddI && - // phase->type( cmp2->in(2) ) == TypeInt::MINUS_1 ) - // return clone_cmp( cmp, cmp1, cmp2->in(1), phase, BoolTest::lt ); - // } else if( _test._test == BoolTest::lt ) { - // if( cmp1_op == Op_AddI && - // phase->type( cmp1->in(2) ) == TypeInt::MINUS_1 ) - // return clone_cmp( cmp, cmp1->in(1), cmp2, phase, BoolTest::le ); - // else if( cmp2_op == Op_AddI && - // phase->type( cmp2->in(2) ) == TypeInt::ONE ) - // return clone_cmp( cmp, cmp1, cmp2->in(1), phase, BoolTest::le ); - // } - return NULL; }