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

commit r17-2341-gb4bdc0d1051918efaa2a4c3bc131f4b8c06addf5
Author: Kael Andrew Alonzo Franco <[email protected]>
Date:   Sun Jul 12 07:52:01 2026 -0400

    match: Remove redundant build_zero_cst (type) [PR114009]
    
    Since PR114009 simplify patterns have integer_zerop, integer_zerop@2 can be 
used
    instead of build_zero_cst (type) to remove function call.
    
    Bootstrapped and tested on x86_64-pc-linux-gnu.
    
            PR tree-optimization/114009
    
    gcc/ChangeLog:
    
            * match.pd: Remove redundant build_zero_cst (type) [PR114009]
    
    Signed-off-by: Kael Andrew Franco <[email protected]>

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

diff --git a/gcc/match.pd b/gcc/match.pd
index 99024d7d015f..0a84699e51e7 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -1328,14 +1328,14 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
 
 /* Fold a * !a into 0.  */
 (simplify
- (mult:c @0 (convert? (eq @0 integer_zerop)))
-  { build_zero_cst (type); })
+ (mult:c @0 (convert? (eq @0 integer_zerop@2)))
+  @2)
 (simplify
- (mult:c @0 (vec_cond (eq @0 integer_zerop) @1 integer_zerop))
-  { build_zero_cst (type); })
+ (mult:c @0 (vec_cond (eq @0 integer_zerop) @1 integer_zerop@2))
+  @2)
 (simplify
- (mult:c @0 (vec_cond (ne @0 integer_zerop) integer_zerop @1))
-  { build_zero_cst (type); })
+ (mult:c @0 (vec_cond (ne @0 integer_zerop) integer_zerop@2 @1))
+  @2)
 
 /* Shifts by precision or greater result in zero.  */
 (for shift (lshift rshift)

Reply via email to