https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96671
Gabriel Ravier <gabravier at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Summary|Failure to optimize a 3 |Failure to optimize a 3
|xor+and pattern to xor + |xor+and pattern to
|andnot |xor+andnot
--- Comment #1 from Gabriel Ravier <gabravier at gmail dot com> ---
Oops, I accidentally pressed enter and filed this with no details. Here are the
details :
int f(int a, int b, int c)
{
return (a ^ b) & ((b ^ c) ^ a);
}
This can be optimized to `return (a ^ b) & ~c`. This transformation is done by
LLVM, but not by GCC.