https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40772
Roger Sayle <roger at nextmovesoftware dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |roger at nextmovesoftware dot com Target Milestone|--- |7.0 Status|UNCONFIRMED |RESOLVED --- Comment #5 from Roger Sayle <roger at nextmovesoftware dot com> --- This issue has been fixed since gcc 7; the compiler now stores the high-byte register ah/bh/dh etc directly to memory. The original tst2b.c testcase when compiled with -O3 -march=k8 -fno-tree-vectorize looks like: test: .LFB0: .cfi_startproc leal 1(%rdi), %edx movl %edi, %eax movb %ah, data(%rip) addl $15, %eax movb %dh, data+1(%rip) leal 2(%rdi), %edx movb %ah, data+15(%rip) movb %dh, data+2(%rip) leal 3(%rdi), %edx movb %dh, data+3(%rip) leal 4(%rdi), %edx movb %dh, data+4(%rip) leal 5(%rdi), %edx movb %dh, data+5(%rip) leal 6(%rdi), %edx movb %dh, data+6(%rip) leal 7(%rdi), %edx movb %dh, data+7(%rip) leal 8(%rdi), %edx movb %dh, data+8(%rip) leal 9(%rdi), %edx movb %dh, data+9(%rip) leal 10(%rdi), %edx movb %dh, data+10(%rip) leal 11(%rdi), %edx movb %dh, data+11(%rip) leal 12(%rdi), %edx movb %dh, data+12(%rip) leal 13(%rdi), %edx movb %dh, data+13(%rip) leal 14(%rdi), %edx movb %dh, data+14(%rip) ret