This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/27567] New: __builtin_memcpy generates redundant stores/moves.
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 May 2006 21:47:46 -0000
- Subject: [Bug other/27567] New: __builtin_memcpy generates redundant stores/moves.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
float convert( unsigned in )
{
float f;
__builtin_memcpy( &f, &in, sizeof( in ) );
return f;
}
$ gcc bug.c -S -O2 -fverbose-asm -m64
convert:
movl %edi, -4(%rsp) # in, f
movl %edi, -20(%rsp) # in, in <=== what for this?
movss -4(%rsp), %xmm0 # f, <result>
ret
$ gcc bug.c -S -O2 -fverbose-asm -m32
convert:
pushl %ebp #
movl %esp, %ebp #,
subl $16, %esp #,
movl 8(%ebp), %eax # in, in \
movl %eax, -4(%ebp) # in, f |--- why not flds 8(%ebp) ?
flds -4(%ebp) # f /
leave
ret
--
Summary: __builtin_memcpy generates redundant stores/moves.
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC build triplet: x86-*-linux
GCC host triplet: x86-*-linux
GCC target triplet: x86-*-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27567