diff options
author | Pan Li <pan2.li@intel.com> | 2024-09-13 11:36:40 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2024-09-13 17:14:56 +0800 |
commit | 45e7cc9caf327bfddd75b3093eb855b8b64acae8 (patch) | |
tree | fdc59f083d97ea932e7fb2f0aaa787c2c1a29108 | |
parent | 5d9486c29938d79beb798dce1a5509da54fe8c9f (diff) | |
download | gcc-45e7cc9caf327bfddd75b3093eb855b8b64acae8.zip gcc-45e7cc9caf327bfddd75b3093eb855b8b64acae8.tar.gz gcc-45e7cc9caf327bfddd75b3093eb855b8b64acae8.tar.bz2 |
Match: Remove unnecessary types_match for case 1 of signed SAT_ADD
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>
-rw-r--r-- | gcc/match.pd | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/match.pd b/gcc/match.pd index 4cef965..5566c0e 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -3204,8 +3204,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) 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) |