src/share/vm/opto/subnode.cpp

changeset 656
1e026f8da827
parent 647
99bf1609e2a5
child 670
9c2ecc2ffb12
equal deleted inserted replaced
655:30369db7f5d2 656:1e026f8da827
741 //============================================================================= 741 //=============================================================================
742 //------------------------------sub-------------------------------------------- 742 //------------------------------sub--------------------------------------------
743 // Simplify an CmpN (compare 2 pointers) node, based on local information. 743 // Simplify an CmpN (compare 2 pointers) node, based on local information.
744 // If both inputs are constants, compare them. 744 // If both inputs are constants, compare them.
745 const Type *CmpNNode::sub( const Type *t1, const Type *t2 ) const { 745 const Type *CmpNNode::sub( const Type *t1, const Type *t2 ) const {
746 const TypePtr *r0 = t1->is_narrowoop()->make_oopptr(); // Handy access 746 const TypePtr *r0 = t1->make_ptr(); // Handy access
747 const TypePtr *r1 = t2->is_narrowoop()->make_oopptr(); 747 const TypePtr *r1 = t2->make_ptr();
748 748
749 // Undefined inputs makes for an undefined result 749 // Undefined inputs makes for an undefined result
750 if( TypePtr::above_centerline(r0->_ptr) || 750 if( TypePtr::above_centerline(r0->_ptr) ||
751 TypePtr::above_centerline(r1->_ptr) ) 751 TypePtr::above_centerline(r1->_ptr) )
752 return Type::TOP; 752 return Type::TOP;

mercurial