Re: [PATCHv2 2/2] Improve do_store_flag for comparing single bit against that bit

2023-06-04 Thread Jeff Law via Gcc-patches
On 5/20/23 09:04, Andrew Pinski via Gcc-patches wrote: This is a case which I noticed while working on the previous patch. Sometimes we end up with `a == CST` instead of comparing against 0. This happens in the following code: ``` unsigned f(unsigned t) { if (t & ~(1<<30)) __builtin_unreach

[PATCHv2 2/2] Improve do_store_flag for comparing single bit against that bit

2023-05-20 Thread Andrew Pinski via Gcc-patches
This is a case which I noticed while working on the previous patch. Sometimes we end up with `a == CST` instead of comparing against 0. This happens in the following code: ``` unsigned f(unsigned t) { if (t & ~(1<<30)) __builtin_unreachable(); t ^= (1<<30); return t != 0; } ``` We should han