Given all commutative binary operators requires types matching
for both operands. Remove the types_match check for case 1 of
the signed SAT_ADD, because we have (bit_xor @0 @1), which ensure
the operands have the correct TREE type.
The below test suites are passed for this patch.
* The rv64gcv fully regression test.
* The x86 bootstrap test.
* The x86 fully regression test.
gcc/ChangeLog:
* match.pd: Remove the types_match check for signed SAT_ADD
case 1.
Signed-off-by: Pan Li <pan2.li@intel.com>
integer_zerop)
(bit_xor:c (negate (convert (lt @0 integer_zerop))) max_value)
@2)
- (if (INTEGRAL_TYPE_P (type) && !TYPE_UNSIGNED (type)
- && types_match (type, @0, @1))))
+ (if (INTEGRAL_TYPE_P (type) && !TYPE_UNSIGNED (type))))
/* Signed saturation add, case 2:
T sum = (T)((UT)X + (UT)Y)