public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/29953]  New: [SH-4] Perfomance regression in loops. cmp/eq used instead of dt
@ 2006-11-23 10:14 nbkolchin at gmail dot com
  2006-11-23 10:15 ` [Bug target/29953] " nbkolchin at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: nbkolchin at gmail dot com @ 2006-11-23 10:14 UTC (permalink / raw)
  To: gcc-bugs

GCC 4.1.1 (probably all 4.* versions, tested 4.3.0-svn also), uses cmp/eq 
instead of "dt" in loops. This leads to ~20% perfomance decrease.

Technically, loop processing algorithm is completely different between
versions.

Example (sources in attach):

CFLAGS="-m4 -O3 -fomit-frame-pointer"

gcc 3.4.4:
----------------------------
.LFB2:
        mov.l   .L11,r3
        mov     #0,r0
        mov.l   .L12,r2
.L5:
        mov.l   @r3+,r1 ! !!!
        dt      r2      ! !!!
        bf/s    .L5
        add     r1,r0
        rts
        nop
.L13:
        .align 2
.L11:
        .long   -1946157056
.L12:
        .long   1000000
-----------------------------

gcc 4.1.1:
-----------------------------
.LFB2:
        mov.l   .L8,r2
        mov     #0,r0
        mov.l   .L9,r3
.L2:
        mov.l   @r2+,r1 ! !!!
        cmp/eq  r3,r2   ! !!!
        bf/s    .L2
        add     r1,r0
        rts
        nop
.L10:
        .align 2
.L8:
        .long   -1946157056
.L9:
        .long   -1942157056
-----------------------------

P.S. We are porting application from gcc3.4 to gcc4.1 and have about 60% 
perfomance decrease. So this is probably just first report. :(


-- 
           Summary: [SH-4] Perfomance regression in loops. cmp/eq used
                    instead of dt
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nbkolchin at gmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sh-rtemself


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


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

end of thread, other threads:[~2007-06-08  8:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-23 10:14 [Bug target/29953] New: [SH-4] Perfomance regression in loops. cmp/eq used instead of dt nbkolchin at gmail dot com
2006-11-23 10:15 ` [Bug target/29953] " nbkolchin at gmail dot com
2007-03-28 10:51 ` mano at roarinelk dot homelinux dot net
2007-04-03  6:43 ` christian dot bruel at st dot com
2007-04-03 14:30 ` christian dot bruel at st dot com
2007-04-03 15:34 ` steven at gcc dot gnu dot org
2007-05-15  9:31 ` chrbr at gcc dot gnu dot org
2007-06-08  7:59 ` chrbr at gcc dot gnu dot org
2007-06-08  8:18 ` chrbr 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).