Re: [PATCH] MATCH: Add simplifications of `(a == CST) & a`

2023-09-18 Thread Richard Biener via Gcc-patches
On Sat, Sep 16, 2023 at 6:00 PM Andrew Pinski via Gcc-patches wrote: > > `(a == CST) & a` can be either simplified to simplying `a == CST` > or 0 depending on the first bit of the CST. > This is an extension of the already pattern of `X & !X` and allows > us to remove the 2 xfails on gcc.dg/binop-

[PATCH] MATCH: Add simplifications of `(a == CST) & a`

2023-09-16 Thread Andrew Pinski via Gcc-patches
`(a == CST) & a` can be either simplified to simplying `a == CST` or 0 depending on the first bit of the CST. This is an extension of the already pattern of `X & !X` and allows us to remove the 2 xfails on gcc.dg/binop-notand1a.c and gcc.dg/binop-notand4a.c. OK? Bootstrapped and tested on x86_64-