Re: [PATCH 1/2] MATCH: [PR111364] Add some more minmax cmp operand simplifications

2023-09-13 Thread Andrew Pinski via Gcc-patches
On Tue, Sep 12, 2023 at 11:45 PM Richard Biener via Gcc-patches wrote: > > On Tue, Sep 12, 2023 at 5:31 PM Andrew Pinski via Gcc-patches > wrote: > > > > This adds a few more minmax cmp operand simplifications which were missed > > before. > > `MIN(a,b) < a` -> `a > b` > > `MIN(a,b) >= a` -> `a

Re: [PATCH 1/2] MATCH: [PR111364] Add some more minmax cmp operand simplifications

2023-09-13 Thread Richard Biener via Gcc-patches
On Tue, Sep 12, 2023 at 5:31 PM Andrew Pinski via Gcc-patches wrote: > > This adds a few more minmax cmp operand simplifications which were missed > before. > `MIN(a,b) < a` -> `a > b` > `MIN(a,b) >= a` -> `a <= b` > `MAX(a,b) > a` -> `a < b` > `MAX(a,b) <= a` -> `a >= b` > > OK? Bootstrapped

[PATCH 1/2] MATCH: [PR111364] Add some more minmax cmp operand simplifications

2023-09-12 Thread Andrew Pinski via Gcc-patches
This adds a few more minmax cmp operand simplifications which were missed before. `MIN(a,b) < a` -> `a > b` `MIN(a,b) >= a` -> `a <= b` `MAX(a,b) > a` -> `a < b` `MAX(a,b) <= a` -> `a >= b` OK? Bootstrapped and tested on x86_64-linux-gnu. Note gcc.dg/pr96708-negative.c needed to updated to