public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/35714]  New: x86 poor code with pmaddwd
@ 2008-03-27  1:03 astrange at ithinksw dot com
  2008-03-27  1:03 ` [Bug target/35714] " astrange at ithinksw dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: astrange at ithinksw dot com @ 2008-03-27  1:03 UTC (permalink / raw)
  To: gcc-bugs

> /usr/local/gcc44/bin/gcc -v
Using built-in specs.
Target: i386-apple-darwin9.2.0
Configured with: ../gcc/configure --prefix=/usr/local/gcc44
--enable-threads=posix --with-arch=core2 --with-tune=core2 --with-gmp=/sw
--with-mpfr=/sw --disable-nls --disable-bootstrap --enable-checking=yes,rtl
CFLAGS=-g LDFLAGS=/usr/lib/libiconv.dylib --enable-languages=c,c++,objc
Thread model: posix
gcc version 4.4.0 20080326 (experimental) (GCC)
> /usr/local/gcc44/bin/gcc -Os -march=core2 -fno-pic -fomit-frame-pointer -flax-vector-conversions -S pmaddwd.c

generates:
_madd_swapped:
        subl    $12, %esp
        movaps  LC0, %xmm1
        addl    $12, %esp
        pmaddwd %xmm1, %xmm0
        ret
.globl _madd
_madd:
        subl    $12, %esp
        movaps  LC0, %xmm1
        addl    $12, %esp
        pmaddwd %xmm0, %xmm1
        movaps  %xmm1, %xmm0
        ret

Both of these should be:
_madd:
        pmaddwd LC0, %xmm0
        ret

since the stack isn't referenced and pmaddwd is commutative. (the variable
being renamed LC0 is PR 31043)


-- 
           Summary: x86 poor code with pmaddwd
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: astrange at ithinksw dot com
 GCC build triplet: i386-apple-darwin9.2.0
  GCC host triplet: i386-apple-darwin9.2.0
GCC target triplet: i386-apple-darwin9.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35714


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

end of thread, other threads:[~2009-10-28  9:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-27  1:03 [Bug target/35714] New: x86 poor code with pmaddwd astrange at ithinksw dot com
2008-03-27  1:03 ` [Bug target/35714] " astrange at ithinksw dot com
2008-03-27  7:42 ` ubizjak at gmail dot com
2008-03-30 20:40 ` pinskia at gcc dot gnu dot org
2008-05-06 12:56 ` ubizjak at gmail dot com
2008-05-07 13:13 ` uros at gcc dot gnu dot org
2008-05-07 13:34 ` ubizjak at gmail dot com
2009-10-28  9:37 ` ubizjak at gmail dot com

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).