< prev index next >

src/share/vm/opto/movenode.cpp

Print this page

        

*** 103,113 **** // Swapped Cmp is OK (phase->eqv(cmp->in(2),f) && phase->eqv(cmp->in(1),t)) ) { // Give up this identity check for floating points because it may choose incorrect // value around 0.0 and -0.0 ! if ( cmp->Opcode()==Op_CmpF || cmp->Opcode()==Op_CmpD ) return NULL; // Check for "(t==f)?t:f;" and replace with "f" if( b->_test._test == BoolTest::eq ) return f; // Allow the inverted case as well --- 103,113 ---- // Swapped Cmp is OK (phase->eqv(cmp->in(2),f) && phase->eqv(cmp->in(1),t)) ) { // Give up this identity check for floating points because it may choose incorrect // value around 0.0 and -0.0 ! if ( cmp->Opcode()==Opcodes::Op_CmpF || cmp->Opcode()==Opcodes::Op_CmpD ) return NULL; // Check for "(t==f)?t:f;" and replace with "f" if( b->_test._test == BoolTest::eq ) return f; // Allow the inverted case as well
*** 262,272 **** default: return NULL; break; } // Find zero input of CmpF; the other input is being abs'd Node *cmpf = bol->in(1); ! if( cmpf->Opcode() != Op_CmpF ) return NULL; Node *X = NULL; bool flip = false; if( phase->type(cmpf->in(cmp_zero_idx)) == TypeF::ZERO ) { X = cmpf->in(3 - cmp_zero_idx); } else if (phase->type(cmpf->in(3 - cmp_zero_idx)) == TypeF::ZERO) { --- 262,272 ---- default: return NULL; break; } // Find zero input of CmpF; the other input is being abs'd Node *cmpf = bol->in(1); ! if( cmpf->Opcode() != Opcodes::Op_CmpF ) return NULL; Node *X = NULL; bool flip = false; if( phase->type(cmpf->in(cmp_zero_idx)) == TypeF::ZERO ) { X = cmpf->in(3 - cmp_zero_idx); } else if (phase->type(cmpf->in(3 - cmp_zero_idx)) == TypeF::ZERO) {
*** 281,291 **** if( X != in(phi_x_idx) ) return NULL; int phi_sub_idx = phi_x_idx == IfTrue ? IfFalse : IfTrue; Node *sub = in(phi_sub_idx); // Allow only SubF(0,X) and fail out for all others; NegF is not OK ! if( sub->Opcode() != Op_SubF || sub->in(2) != X || phase->type(sub->in(1)) != TypeF::ZERO ) return NULL; Node *abs = new AbsFNode( X ); if( flip ) --- 281,291 ---- if( X != in(phi_x_idx) ) return NULL; int phi_sub_idx = phi_x_idx == IfTrue ? IfFalse : IfTrue; Node *sub = in(phi_sub_idx); // Allow only SubF(0,X) and fail out for all others; NegF is not OK ! if( sub->Opcode() != Opcodes::Op_SubF || sub->in(2) != X || phase->type(sub->in(1)) != TypeF::ZERO ) return NULL; Node *abs = new AbsFNode( X ); if( flip )
*** 318,328 **** default: return NULL; break; } // Find zero input of CmpD; the other input is being abs'd Node *cmpd = bol->in(1); ! if( cmpd->Opcode() != Op_CmpD ) return NULL; Node *X = NULL; bool flip = false; if( phase->type(cmpd->in(cmp_zero_idx)) == TypeD::ZERO ) { X = cmpd->in(3 - cmp_zero_idx); } else if (phase->type(cmpd->in(3 - cmp_zero_idx)) == TypeD::ZERO) { --- 318,328 ---- default: return NULL; break; } // Find zero input of CmpD; the other input is being abs'd Node *cmpd = bol->in(1); ! if( cmpd->Opcode() != Opcodes::Op_CmpD ) return NULL; Node *X = NULL; bool flip = false; if( phase->type(cmpd->in(cmp_zero_idx)) == TypeD::ZERO ) { X = cmpd->in(3 - cmp_zero_idx); } else if (phase->type(cmpd->in(3 - cmp_zero_idx)) == TypeD::ZERO) {
*** 337,347 **** if( X != in(phi_x_idx) ) return NULL; int phi_sub_idx = phi_x_idx == IfTrue ? IfFalse : IfTrue; Node *sub = in(phi_sub_idx); // Allow only SubD(0,X) and fail out for all others; NegD is not OK ! if( sub->Opcode() != Op_SubD || sub->in(2) != X || phase->type(sub->in(1)) != TypeD::ZERO ) return NULL; Node *abs = new AbsDNode( X ); if( flip ) --- 337,347 ---- if( X != in(phi_x_idx) ) return NULL; int phi_sub_idx = phi_x_idx == IfTrue ? IfFalse : IfTrue; Node *sub = in(phi_sub_idx); // Allow only SubD(0,X) and fail out for all others; NegD is not OK ! if( sub->Opcode() != Opcodes::Op_SubD || sub->in(2) != X || phase->type(sub->in(1)) != TypeD::ZERO ) return NULL; Node *abs = new AbsDNode( X ); if( flip )
< prev index next >