https://gcc.gnu.org/g:a8d172b5ff6d61b9b5caecd029e866f1a4a30593

commit r16-5530-ga8d172b5ff6d61b9b5caecd029e866f1a4a30593
Author: Pan Li <[email protected]>
Date:   Sat Nov 15 11:22:23 2025 +0800

    Match: Remove unnecessary convert for unsigned SAT_MUL
    
    After we convert from bit_op outer into its captures, some
    outer convert of unsigned SAT_MUL form 6 is unnecessary any
    more.  Thus, remove it.  Meanwhile, add c after outer bit_ior
    to make the test happy.
    
    gcc/ChangeLog:
    
            * match.pd: Remove unnecessary outer convert and add
            c for the outer bit_ior.
    
    Signed-off-by: Pan Li <[email protected]>

Diff:
---
 gcc/match.pd | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/gcc/match.pd b/gcc/match.pd
index 22b1bd054b0e..bc31d7cc3f6a 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -3778,12 +3778,11 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
        return lo | -!!hi;
       } while WT is uint128_t, uint64_t, uint32_t, uint16_t,
        and T is uint64_t, uint32_t, uint16_t, uint8_t.  */
-   (convert1?
-    (bit_ior
-     (convert?
-      (negate
-       (convert (ne (convert2? (rshift @3 INTEGER_CST@2)) integer_zerop))))
-     (convert (usmul_widen_mult@3 @0 @1))))
+   (bit_ior:c
+    (convert?
+     (negate
+      (convert (ne (convert2? (rshift @3 INTEGER_CST@2)) integer_zerop))))
+    (convert (usmul_widen_mult@3 @0 @1)))
    (if (types_match (type, @0, @1))
     (with
      {

Reply via email to