This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/30961] [4.2/4.3 regression] redundant reg/mem stores/moves
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 May 2007 18:03:36 -0000
- Subject: [Bug target/30961] [4.2/4.3 regression] redundant reg/mem stores/moves
- References: <bug-30961-7667@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from hjl at lucon dot org 2007-05-12 19:03 -------
Gcc 4.3 gives the same output for
float convert1( unsigned in )
{
float f;
__builtin_memcpy( &f, &in, sizeof( in ) );
return f;
}
float convert2( unsigned in )
{
union
{
float f;
unsigned i;
} x;
x.i = in;
return x.f;
}
while gcc 3.4 can optimize the first one. At least, gcc 4.3 is consistent.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30961