https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90408
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |10.3 Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Oliver Stoeneberg from comment #3) > Thanks - I checked with godbolt and it looks fine for -O1 and -O2 now. > > -Os on trunk generates an additional instruction compared to previous > versions > > xor eax, eax Yes that is on purpose as it reduces the overall size. X86 you cannot just look at the # of instructions to figure out if it is a size win. So closing as fixed.