[Bug target/48609] New: Inefficient complex float store
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 14 13:57:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48609
Summary: Inefficient complex float store
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
CC: ubizjak@gmail.com
Target: x86_64
[hjl@gnu-6 pr1000]$ cat s2.i
typedef _Complex float SCtype;
extern SCtype bar;
void
foo (SCtype x)
{
bar = x;
}
[hjl@gnu-6 pr1000]$ /usr/gcc-4.7/bin/gcc -S -O2 s2.i
[hjl@gnu-6 pr1000]$ cat s2.s
.file "s2.i"
.text
.p2align 4,,15
.globl foo
.type foo, @function
foo:
.LFB0:
.cfi_startproc
movq %xmm0, -8(%rsp)
movl -8(%rsp), %eax
movl %eax, bar(%rip)
movl -4(%rsp), %eax
movl %eax, bar+4(%rip)
ret
.cfi_endproc
.LFE0:
.size foo, .-foo
We should simply do
movq %xmm0, bar(%rip)
More information about the Gcc-bugs
mailing list