https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98909
--- Comment #3 from Andrew Pinski ---
Note this is very similar to PR 112104, in that `~a` can be treated as `a ^
-1`.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98909
Andrew Pinski changed:
What|Removed |Added
Severity|normal |enhancement
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98909
Richard Biener changed:
What|Removed |Added
Last reconfirmed||2021-02-02
Status|UNCONFIRM
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98909
--- Comment #1 from Gabriel Ravier ---
PS: The same pattern with `unsigned` replacing `int` can be optimized to
`return x & 1;` (done by LLVM, but not by GCC).