https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109424
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |roger at nextmovesoftware dot
com
--- Comment #3 from Roger Sayle <roger at nextmovesoftware dot com> ---
Interestingly, this is a C++ front-end issue, as the C front-end doesn't
exhibit this behaviour. However, in C++, it affects both unary operators,
NOT_EXPR and NEGATE_EXPR.
It would be great if the middle-end could hoist unary operators, such as
int f2(int x, int y)
{
return (x > y) ? ~x : ~y;
}
[like LLVM].