public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "uros at kss-loka dot si" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/21676] [4.0/4.1/4.2 Regression] Optimizer regression: SciMark sparse matrix benchmark Date: Wed, 16 Aug 2006 12:16:00 -0000 [thread overview] Message-ID: <20060816121556.6870.qmail@sourceware.org> (raw) In-Reply-To: <bug-21676-10607@http.gcc.gnu.org/bugzilla/> ------- Comment #6 from uros at kss-loka dot si 2006-08-16 12:15 ------- IMO the problem here is in IVopts. Using gcc-3.x, the innermost loop compiles to: .L15: movl (%edi,%edx,4), %eax fldl (%ebp,%edx,8) addl $1, %edx fmull (%esi,%eax,8) cmpl %ecx, %edx faddp %st, %st(1) jl .L15 and with current SVN gcc-4.2 into: .L12: movl (%ecx), %eax fldl (%ebp,%eax,8) fmull (%edx) faddp %st, %st(1) addl $1, %ebx addl $4, %ecx addl $8, %edx cmpl %esi, %ebx jne .L12 Adding -fno-ivopts, this loop gets compiled into: .L12: movl (%edi,%edx,4), %eax fldl (%esi,%eax,8) fmull (%ebp,%edx,8) faddp %st, %st(1) addl $1, %edx cmpl %edx, %ecx jg .L12 Timings (-O3 -march=pentium4 -fomit-frame-pointer): gcc-3.2: 0m2.301s gcc-4.2: 0m2.713s gcc-4.2 + -fno-ivopts: 0m2.473s with: gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7) gcc version 4.2.0 20060816 (experimental) I think that remaining time difference is due to strange loop above innermost: gcc-3.2: fld %st(0) .L16: movl 36(%esp), %eax fld %st(0) movl 4(%eax,%ebx,4), %ecx movl (%eax,%ebx,4), %edx cmpl %ecx, %edx jge .L23 .L15: movl (%edi,%edx,4), %eax fldl (%ebp,%edx,8) addl $1, %edx fmull (%esi,%eax,8) cmpl %ecx, %edx faddp %st, %st(1) jl .L15 .L23: movl 28(%esp), %eax fstpl (%eax,%ebx,8) addl $1, %ebx cmpl 24(%esp), %ebx jl .L16 ======== gcc-4.2: .L8: movl 36(%esp), %edx movl (%edx,%edi,4), %eax movl 4(%edx,%edi,4), %esi fldz cmpl %esi, %eax jge .L11 fstp %st(0) movl 40(%esp), %ebx leal (%ebx,%eax,4), %ecx movl 32(%esp), %ebx leal (%ebx,%eax,8), %edx fldz xorl %ebx, %ebx subl %eax, %esi .L12: movl (%ecx), %eax fldl (%ebp,%eax,8) fmull (%edx) faddp %st, %st(1) addl $1, %ebx addl $4, %ecx addl $8, %edx cmpl %esi, %ebx jne .L12 .L11: movl 28(%esp), %eax fstpl (%eax,%edi,8) addl $1, %edi cmpl 24(%esp), %edi jne .L8 ======== and gcc-4.2 -fno-ivopts: .L8: leal (%ebx,%ebx), %eax movl 40(%esp), %edx movl (%edx,%eax,2), %edx movl %edx, (%esp) movl 40(%esp), %edx movl 4(%edx,%eax,2), %ecx fldz cmpl %ecx, (%esp) jge .L11 fstp %st(0) movl (%esp), %edx fldz .L12: movl (%edi,%edx,4), %eax fldl (%esi,%eax,8) fmull (%ebp,%edx,8) faddp %st, %st(1) addl $1, %edx cmpl %edx, %ecx jg .L12 .L11: movl 32(%esp), %ecx fstpl (%ecx,%ebx,8) addl $1, %ebx cmpl %ebx, 28(%esp) jg .L8 -- uros at kss-loka dot si changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |uros at kss-loka dot si Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2006-08-16 12:15:56 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21676
next prev parent reply other threads:[~2006-08-16 12:16 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-21676-10607@http.gcc.gnu.org/bugzilla/> 2006-06-04 19:59 ` jsm28 at gcc dot gnu dot org 2006-06-04 20:06 ` pinskia at gcc dot gnu dot org 2006-06-06 11:46 ` gcc at pdoerfler dot com 2006-07-10 12:45 ` rguenth at gcc dot gnu dot org 2006-08-16 6:50 ` pinskia at gcc dot gnu dot org 2006-08-16 12:16 ` uros at kss-loka dot si [this message] 2006-08-17 7:21 ` uros at kss-loka dot si 2006-08-17 7:46 ` uros at kss-loka dot si 2006-08-29 5:24 ` [Bug rtl-optimization/21676] [4.0/4.1 " pinskia at gcc dot gnu dot org 2006-08-29 6:13 ` [Bug rtl-optimization/21676] [4.0/4.1/4.2 " uros at kss-loka dot si 2007-02-14 9:11 ` [Bug rtl-optimization/21676] [4.0/4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org 2007-12-16 23:17 ` steven at gcc dot gnu dot org 2007-12-16 23:49 ` ubizjak at gmail dot com 2008-01-12 15:29 ` steven at gcc dot gnu dot org 2008-02-06 11:06 ` ubizjak at gmail dot com 2008-07-04 16:54 ` [Bug rtl-optimization/21676] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org 2008-11-22 10:33 ` steven at gcc dot gnu dot org 2009-02-05 8:03 ` [Bug tree-optimization/21676] " bonzini at gnu dot org 2009-02-16 9:04 ` [Bug tree-optimization/21676] [4.2/4.3 " bonzini at gnu dot org 2009-03-31 18:47 ` [Bug tree-optimization/21676] [4.3 " jsm28 at gcc dot gnu dot org 2009-04-22 15:10 ` 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=20060816121556.6870.qmail@sourceware.org \ --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).