https://gcc.gnu.org/g:77650ddd3820d02a9d1ddb17c3af80b4eabaeca1

commit r17-2342-g77650ddd3820d02a9d1ddb17c3af80b4eabaeca1
Author: Kael Andrew Alonzo Franco <[email protected]>
Date:   Sun Jul 12 07:53:14 2026 -0400

    match: Remove redundant build_one_cst (type) [PR104280]
    
    integer_onep@0 is present, so use @0 instead of build_one_cst (type)
    to remove function call.
    
    Bootstrapped and tested on x86_64-pc-linux-gnu.
    
            PR tree-optimization/104280
    
    gcc/ChangeLog:
    
            * match.pd: Remove redundant build_one_cst (type) [PR104280]
    
    Signed-off-by: Kael Andrew Franco <[email protected]>

Diff:
---
 gcc/match.pd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/match.pd b/gcc/match.pd
index 0a84699e51e7..9d4ab622fe57 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -632,7 +632,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
       && !integer_zerop (@1)
       && (!flag_non_call_exceptions || tree_expr_nonzero_p (@1)))
   (if (TYPE_UNSIGNED (type))
-   (convert (eq:boolean_type_node @1 { build_one_cst (type); }))
+   (convert (eq:boolean_type_node @1 @0))
    (if (fold_before_rtl_expansion_p ())
     (with { tree utype = unsigned_type_for (type); }
      (cond (le (plus (convert:utype @1) { build_one_cst (utype); })

Reply via email to