[gcc r17-3529] match: Convert for mul_carry_low_sum and mul_carry_cross_sum is not optional [PR126957]

Andrea Pinski via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:0d8cda8fdbbf821f8caf8b3c59db6be43d552c5b

commit r17-3529-g0d8cda8fdbbf821f8caf8b3c59db6be43d552c5b
Author: Andrea Pinski <[email protected]>
Date:   Fri Aug 21 00:01:10 2026 -0700

    match: Convert for mul_carry_low_sum and mul_carry_cross_sum is not optional [PR126957]
    
    Since the case here we have is `convert (comparison)` The only case where the cast
    would be optional would be for a 1bit integer type but these match patterns are
    not expecting that so just remove the `?` on the convert. This reduces the generated
    code from genmatch.
    
    Pushed as obvious after a bootstrap/test on x86_64-linux-gnu.
    
            PR tree-optimization/126957
    
    gcc/ChangeLog:
    
            * match.pd (mul_carry_low_sum): Remove `?` from convert.
            (mul_carry_cross_sum): Likewise.
    
    Signed-off-by: Andrea Pinski <[email protected]>

Diff:
---
 gcc/match.pd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/match.pd b/gcc/match.pd
index ab6e3e4b9f1e..2615da2ba7cd 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -12859,7 +12859,7 @@ and,
    constraints, and @0 ties the shift amount to the inner constants.  */
 (match (mul_carry_low_sum @op0 @op1 @mul_hilo0 @mul_hilo1 @mul_hilo2 @0 @1)
   (lshift
-    (convert? (gt
+    (convert (gt
       @mul_hilo0
       (mul_low_sum @op0 @op1 @mul_hilo1 @mul_hilo2 INTEGER_CST@0
        INTEGER_CST@1)))
@@ -12869,7 +12869,7 @@ and,
    with no inherent type or halfwidth constraint.  */
 (match (mul_carry_cross_sum @mul_hilo0 @mul_hilo1 @mul_hilo2 @0)
   (lshift
-    (convert? (gt
+    (convert (gt
       @mul_hilo0
       (mul_cross_sum @mul_hilo1 @mul_hilo2)))
     INTEGER_CST@0)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.