https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87011
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |jakub at gcc dot gnu.org Resolution|--- |INVALID --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- That seems to be intentional and the right thing to me, what GCC 7 did means unaligned stores. movq $0, 4(%rdi) movl $0, 12(%rdi) movl $3355185, (%rdi) vs. pxor %xmm0, %xmm0 movups %xmm0, (%rdi) movl $3355185, (%rdi) where the latter, while using unaligned store, is actually at least 64-bit aligned 128-store. With -O2 -mno-sse it is movq $0, (%rdi) movq $0, 8(%rdi) movl $3355185, (%rdi) which also looks to be better. With -m32 where &p->a[4] is word-aligned we still do that, or if you change the testcase to: struct S { char a[8]; void (*pf)(void); }; void f (struct S *p) { __builtin_memset (p, 0, sizeof *p); __builtin_strcpy (p->a, "1234567"); } then it is also adjusted.