https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95737
--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> --- Somewhat more constructive... The problem here is that neg isn't pushed "through" isel insns. This in general means you need to negate both inputs to the isel of course, but there are cases where that is advantageous, like here when both of those inputs are constants (or actually registers, but set to some constant). This is one reason the new set[n]bc[r] insns are so useful to us: it is all one insn, also on RTL level, so it naturally works out in such cases. It also is slightly faster anyway of course, fewer insns and all that, even if for dataflow it is all the same.