https://gcc.gnu.org/g:0fb1d14d2a207764d10d4e7911f5f7233d15c998
commit r17-2500-g0fb1d14d2a207764d10d4e7911f5f7233d15c998 Author: Kael Andrew Alonzo Franco <[email protected]> Date: Fri Jul 17 14:14:26 2026 -0400 match: Move tree_expr_nonnegative_p (@1) to tree_expr_nonnegative_p@1. [PR126087] This simplify r17-2487. Bootstrapped and tested on x86_64-pc-linux-gnu. PR tree-optimization/126087 gcc/ChangeLog: * match.pd: Move tree_expr_nonnegative_p (@1) to tree_expr_nonnegative_p@1. Signed-off-by: Kael Andrew Franco <[email protected]> Diff: --- gcc/match.pd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/match.pd b/gcc/match.pd index a5870dae46b9..07b3f72d73b3 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -4847,9 +4847,8 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (for op (min bit_ior) (for cmp (ge lt) (simplify - (cmp (op:c @0 @1) integer_zerop@2) - (if (tree_expr_nonnegative_p (@1)) - (cmp @0 @2))))) + (cmp (op:c @0 tree_expr_nonnegative_p@1) integer_zerop@2) + (cmp @0 @2)))) /* Undo fancy ways of writing max/min or other ?: expressions, like a - ((a - b) & -(a < b)) and a - (a - b) * (a < b) into (a < b) ? b : a.
