https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94889
Gabriel Ravier <gabravier at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gabravier at gmail dot com --- Comment #1 from Gabriel Ravier <gabravier at gmail dot com> --- For some reason, I can reproduce this, but only if `-mavx2` is not present. Having AVX2 enabled somehow ends up makes it so this is optimized to a `return ~x`. (Also, this means that it is a bitwise not and not a negate that this should optimize down to)