[Bug middle-end/78904] zero-extracts are not effective
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Dec 22 21:51:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78904
--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
A better testcase:
--cut here--
struct S1
{
char pad1;
unsigned char val;
short pad2;
};
struct S1 test (struct S1 a, struct S1 b)
{
a.val += b.val;
return a;
}
--cut here--
compiles with -O2 to:
movl %edi, %eax
movl %esi, %ecx
movzbl %ch, %edx
movzbl %ah, %esi
addl %esi, %edx
movb %dl, %ah
with patched compiler:
movl %edi, %eax
movl %esi, %edx
addb %ah, %dh
movl %edx, %eax
More information about the Gcc-bugs
mailing list