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 <kaelfandrew@gmail.com>
(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.