equal
deleted
inserted
replaced
240 //------------------------------sub-------------------------------------------- |
240 //------------------------------sub-------------------------------------------- |
241 // A subtract node differences it's two inputs. |
241 // A subtract node differences it's two inputs. |
242 const Type *SubINode::sub( const Type *t1, const Type *t2 ) const { |
242 const Type *SubINode::sub( const Type *t1, const Type *t2 ) const { |
243 const TypeInt *r0 = t1->is_int(); // Handy access |
243 const TypeInt *r0 = t1->is_int(); // Handy access |
244 const TypeInt *r1 = t2->is_int(); |
244 const TypeInt *r1 = t2->is_int(); |
245 int32 lo = r0->_lo - r1->_hi; |
245 int32_t lo = r0->_lo - r1->_hi; |
246 int32 hi = r0->_hi - r1->_lo; |
246 int32_t hi = r0->_hi - r1->_lo; |
247 |
247 |
248 // We next check for 32-bit overflow. |
248 // We next check for 32-bit overflow. |
249 // If that happens, we just assume all integers are possible. |
249 // If that happens, we just assume all integers are possible. |
250 if( (((r0->_lo ^ r1->_hi) >= 0) || // lo ends have same signs OR |
250 if( (((r0->_lo ^ r1->_hi) >= 0) || // lo ends have same signs OR |
251 ((r0->_lo ^ lo) >= 0)) && // lo results have same signs AND |
251 ((r0->_lo ^ lo) >= 0)) && // lo results have same signs AND |