[Bug target/78967] New: inserts are not effective
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jan 2 16:28:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78967
Bug ID: 78967
Summary: inserts are not effective
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: ubizjak at gmail dot com
Target Milestone: ---
Similar to PR78904, following testcase:
--cut here--
struct S1
{
unsigned char pad1;
unsigned char val;
unsigned short pad2;
};
extern unsigned char t;
struct S1 foo (struct S1 a)
{
a.val = t;
return a;
}
--cut here--
compiles to (-O2):
movzbl t(%rip), %edx
movl %edi, %eax
movb %dl, %ah
Optimal code would be:
movl %edi, %eax
movb t(%rip), %ah
More information about the Gcc-bugs
mailing list