Re: [PATCH 3/3] MATCH: Add some more value_replacement simplifications to match

2023-10-30 Thread Richard Biener
On Sun, Oct 29, 2023 at 5:41 PM Andrew Pinski wrote: > > This moves a few more value_replacements simplifications to match. > /* a == 1 ? b : a * b -> a * b */ > /* a == 1 ? b : b / a -> b / a */ > /* a == -1 ? b : a & b -> a & b */ > > Also adds a testcase to show can we catch these where value_

[PATCH 3/3] MATCH: Add some more value_replacement simplifications to match

2023-10-29 Thread Andrew Pinski
This moves a few more value_replacements simplifications to match. /* a == 1 ? b : a * b -> a * b */ /* a == 1 ? b : b / a -> b / a */ /* a == -1 ? b : a & b -> a & b */ Also adds a testcase to show can we catch these where value_replacement would not (but other passes would). Bootstrapped and