https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66348
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I suspect there is an alias violation here rather what is described. In x86_64, almost all of the instructions which act on 32bit half of the registers will zero extend. That includes xorl.