public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/27567]  New: __builtin_memcpy generates redundant stores/moves.
@ 2006-05-11 21:47 pluto at agmk dot net
  2006-05-12  8:27 ` [Bug rtl-optimization/27567] [4.0/4.1/4.2 Regression] " rguenth at gcc dot gnu dot org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: pluto at agmk dot net @ 2006-05-11 21:47 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2008-02-20 22:38 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-11 21:47 [Bug other/27567] New: __builtin_memcpy generates redundant stores/moves pluto at agmk dot net
2006-05-12  8:27 ` [Bug rtl-optimization/27567] [4.0/4.1/4.2 Regression] " rguenth at gcc dot gnu dot org
2006-06-04 19:01 ` mmitchel at gcc dot gnu dot org
2006-08-27 18:59 ` pinskia at gcc dot gnu dot org
2006-08-27 19:00 ` [Bug middle-end/27567] " pinskia at gcc dot gnu dot org
2006-08-29 14:35 ` jakub at gcc dot gnu dot org
2006-08-30 15:50 ` patchapp at dberlin dot org
2006-09-02  6:55 ` jakub at gcc dot gnu dot org
2007-02-03 17:01 ` [Bug middle-end/27567] [4.0/4.1 " gdr at gcc dot gnu dot org
2007-02-03 20:32 ` pinskia at gcc dot gnu dot org
2007-02-14  9:12 ` mmitchel at gcc dot gnu dot org
2007-02-14 22:24 ` pluto at agmk dot net
2007-02-20 10:25 ` [Bug middle-end/27567] [4.0/4.1/4.2 " pluto at agmk dot net
2007-02-20 16:42 ` [Bug middle-end/27567] [4.0/4.1 " pinskia at gcc dot gnu dot org
2007-02-25 18:28 ` pluto at agmk dot net
2007-06-26 11:46 ` jakub at gcc dot gnu dot org
2008-02-20 22:38 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).