Re: [PATCH] VR-VALUES [PR28794]: optimize compare assignments also

2023-08-08 Thread Richard Biener via Gcc-patches
On Mon, Aug 7, 2023 at 4:46 PM Andrew Pinski via Gcc-patches wrote: > > This patch fixes the oldish (2006) bug where VRP was not > optimizing the comparison for assignments while handling > them for GIMPLE_COND only. > It just happens to also solves PR 103281 due to allowing > to optimize `c < 1`

[PATCH] VR-VALUES [PR28794]: optimize compare assignments also

2023-08-07 Thread Andrew Pinski via Gcc-patches
This patch fixes the oldish (2006) bug where VRP was not optimizing the comparison for assignments while handling them for GIMPLE_COND only. It just happens to also solves PR 103281 due to allowing to optimize `c < 1` to `c == 0` and then we get `(c == 0) == c` (which was handled by r14-2501-g285c9