Re: [PATCH] MATCH: [PR111282] Simplify `a & (b ^ ~a)` to `a & b`

2023-10-11 Thread Richard Biener
On Wed, Oct 11, 2023 at 2:46 AM Andrew Pinski wrote: > > While `a & (b ^ ~a)` is optimized to `a & b` on the rtl level, > it is always good to optimize this at the gimple level and allows > us to match a few extra things including where a is a comparison. > > Note I had to update/change the testca

[PATCH] MATCH: [PR111282] Simplify `a & (b ^ ~a)` to `a & b`

2023-10-10 Thread Andrew Pinski
While `a & (b ^ ~a)` is optimized to `a & b` on the rtl level, it is always good to optimize this at the gimple level and allows us to match a few extra things including where a is a comparison. Note I had to update/change the testcase and-1.c to avoid matching this case as we can match -2 and 1 a