Re: [PATCH] Fix PR 110539: missed optimization after moving two_value to match.pd

2023-07-10 Thread Richard Biener via Gcc-patches
On Fri, Jul 7, 2023 at 7:57 PM Andrew Pinski via Gcc-patches wrote: > > When I moved two_value to match.pd, I removed the check for the {0,+-1} > as I had placed it after the {0,+-1} case for cond in match.pd. > In the case of {0,+-1} and non boolean, before we would optmize those > case to just `

[PATCH] Fix PR 110539: missed optimization after moving two_value to match.pd

2023-07-07 Thread Andrew Pinski via Gcc-patches
When I moved two_value to match.pd, I removed the check for the {0,+-1} as I had placed it after the {0,+-1} case for cond in match.pd. In the case of {0,+-1} and non boolean, before we would optmize those case to just `(convert)a` but after we would get `(convert)(a != 0)` which was not handled an