public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "astrange at ithinksw dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/36127] New: bad choice of loop IVs above -Os on x86 Date: Mon, 05 May 2008 02:12:00 -0000 [thread overview] Message-ID: <bug-36127-10175@http.gcc.gnu.org/bugzilla/> (raw) > /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
next reply other threads:[~2008-05-05 2:12 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-05-05 2:12 astrange at ithinksw dot com [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-36127-10175@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).