https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986

--- Comment #1 from Ivan Sorokin <vanyacpp at gmail dot com> ---
(In reply to Ivan Sorokin from comment #0)
> int foo(int a, int b)
> {
>     return (~a | b) ^ a;
> }
> 
> This can be optimized to `return ~(a | b);`. This transformation is done by
> LLVM, but not by GCC.

Correction: it can be optimized to `return ~(a & b);`.

Reply via email to