public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/36127]  New: bad choice of loop IVs above -Os on x86
@ 2008-05-05  2:12 astrange at ithinksw dot com
  2008-05-05  2:12 ` [Bug tree-optimization/36127] " astrange at ithinksw dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: astrange at ithinksw dot com @ 2008-05-05  2:12 UTC (permalink / raw)
  To: gcc-bugs

> /usr/local/gcc44/bin/gcc -v
[..]
gcc version 4.4.0 20080503 (experimental) (GCC)
> gcc -O3 -mfpmath=sse -fno-pic -fno-tree-vectorize -S himenoBMTxps.c

With -O2/-O3, the inner loop in jacobi() in this program ends containing a lot
of this:
        movss   _p-4(%edi,%edx,4), %xmm0
        movl    -96(%ebp), %edi
        subss   _p-4(%edi,%edx,4), %xmm0
        movl    -108(%ebp), %edi
        subss   _p-4(%edi,%edx,4), %xmm0
        movl    -92(%ebp), %edi
        addss   _p-4(%edi,%edx,4), %xmm0
        movl    -124(%ebp), %edi

At -O1 or -Os, it instead produces:
        movss   34056(%eax), %xmm0
        subss   33024(%eax), %xmm0
        subss   -33024(%eax), %xmm0
        addss   -34056(%eax), %xmm0

which is much better. On core 2 it claims to be 40% faster at -Os.

IIRC this isn't a problem on x86-64, but IRA+-O3 was much worse again.


-- 
           Summary: bad choice of loop IVs above -Os on x86
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: astrange at ithinksw dot com
GCC target triplet: i?86-*-*


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


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

end of thread, other threads:[~2023-06-21  8:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-36127-4@http.gcc.gnu.org/bugzilla/>
2023-06-21  3:44 ` [Bug tree-optimization/36127] bad choice of loop IVs above -Os on x86 pinskia at gcc dot gnu.org
2023-06-21  8:05 ` rguenth at gcc dot gnu.org
2008-05-05  2:12 [Bug tree-optimization/36127] New: " astrange at ithinksw dot com
2008-05-05  2:12 ` [Bug tree-optimization/36127] " astrange at ithinksw dot com
2008-05-05  2:12 ` astrange at ithinksw dot com
2008-05-05  2:13 ` astrange at ithinksw dot com
2008-05-05  2:13 ` astrange at ithinksw dot com
2008-05-07 17:37 ` astrange at ithinksw dot com
2009-08-07  3:04 ` astrange at ithinksw dot com
2009-08-07  4:40 ` spop at gcc dot gnu dot org
2009-08-07  8:32 ` 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).