https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92342
Segher Boessenkool <segher at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2019-11-04 CC| |segher at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> --- (That is r271047; confirmed). As the commit message says, with that patch we generate better code on average for all targets (except alpha). Which isn't surprising at all, given what it does. Combine (or better, simplify-rtx) does not know how to handle (and:SI (neg:SI (eq:SI x y)) (reg:SI z)) Btw, try int h(int a, int b, int c, int d) { return (c & -(a==b)) | (d & -(a!=b)); } to see we have some way to go here.