Re: [PATCH] VR-VALUES: Simplify comparison using range pairs

2023-08-10 Thread Andrew Pinski via Gcc-patches
On Thu, Aug 10, 2023 at 12:08 PM Andrew Pinski wrote: > > On Thu, Aug 10, 2023 at 12:18 AM Richard Biener via Gcc-patches > wrote: > > > > On Wed, Aug 9, 2023 at 6:16 PM Andrew Pinski via Gcc-patches > > wrote: > > > > > > If `A` has a range of `[0,0][100,INF]` and the comparison > > > of `A <

Re: [PATCH] VR-VALUES: Simplify comparison using range pairs

2023-08-10 Thread Andrew Pinski via Gcc-patches
On Thu, Aug 10, 2023 at 12:18 AM Richard Biener via Gcc-patches wrote: > > On Wed, Aug 9, 2023 at 6:16 PM Andrew Pinski via Gcc-patches > wrote: > > > > If `A` has a range of `[0,0][100,INF]` and the comparison > > of `A < 50`. This should be optimized to `A <= 0` (which then > > will be

Re: [PATCH] VR-VALUES: Simplify comparison using range pairs

2023-08-10 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Thu, Aug 10, 2023 at 3:44 PM Richard Sandiford > wrote: >> >> Richard Biener via Gcc-patches writes: >> > On Wed, Aug 9, 2023 at 6:16 PM Andrew Pinski via Gcc-patches >> > wrote: >> >> >> >> If `A` has a range of `[0,0][100,INF]` and the comparison >> >> of `A <

Re: [PATCH] VR-VALUES: Simplify comparison using range pairs

2023-08-10 Thread Richard Biener via Gcc-patches
On Thu, Aug 10, 2023 at 3:44 PM Richard Sandiford wrote: > > Richard Biener via Gcc-patches writes: > > On Wed, Aug 9, 2023 at 6:16 PM Andrew Pinski via Gcc-patches > > wrote: > >> > >> If `A` has a range of `[0,0][100,INF]` and the comparison > >> of `A < 50`. This should be optimized to `A <=

Re: [PATCH] VR-VALUES: Simplify comparison using range pairs

2023-08-10 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Wed, Aug 9, 2023 at 6:16 PM Andrew Pinski via Gcc-patches > wrote: >> >> If `A` has a range of `[0,0][100,INF]` and the comparison >> of `A < 50`. This should be optimized to `A <= 0` (which then >> will be optimized to just `A == 0`). >> This patch

Re: [PATCH] VR-VALUES: Simplify comparison using range pairs

2023-08-10 Thread Richard Biener via Gcc-patches
On Wed, Aug 9, 2023 at 6:16 PM Andrew Pinski via Gcc-patches wrote: > > If `A` has a range of `[0,0][100,INF]` and the comparison > of `A < 50`. This should be optimized to `A <= 0` (which then > will be optimized to just `A == 0`). > This patch implement this via a new function which sees if >

[PATCH] VR-VALUES: Simplify comparison using range pairs

2023-08-09 Thread Andrew Pinski via Gcc-patches
If `A` has a range of `[0,0][100,INF]` and the comparison of `A < 50`. This should be optimized to `A <= 0` (which then will be optimized to just `A == 0`). This patch implement this via a new function which sees if the constant of a comparison is in the middle of 2 range pairs and change the