public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/26949]  New: [4.2 regression] worse code generated for -march=pentium4
@ 2006-03-30 18:26 dann at godzilla dot ics dot uci dot edu
  2006-06-04 19:36 ` [Bug target/26949] " jsm28 at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2006-03-30 18:26 UTC (permalink / raw)
  To: gcc-bugs

Compiling the code in PR26944 with -O2 -march=pentium4 -fno-tree-ch
generates this for the loop:
.L3:
        movl    %esi, -4(%eax)
        addl    $1, %edx
        addl    $4, %eax
        cmpl    -16(%ebp), %edx  <----- note an extra memory access here
        jle     .L3

compiling for -march=i686 (or even just adding -fomit-frame-pointer) generates:

.L3:
        addl    $1, %ecx
        movl    %ebx, -4(%edx)
        addl    $4, %edx
        cmpl    %eax, %ecx  <---- no memory access here
        jle     .L3

The above problem does not happen with gcc-4.0.3 or 4.1.0


-- 
           Summary: [4.2 regression] worse code generated for -
                    march=pentium4
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dann at godzilla dot ics dot uci dot edu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug target/26949] [4.2 regression] worse code generated for -march=pentium4
  2006-03-30 18:26 [Bug target/26949] New: [4.2 regression] worse code generated for -march=pentium4 dann at godzilla dot ics dot uci dot edu
@ 2006-06-04 19:36 ` jsm28 at gcc dot gnu dot org
  2006-06-04 19:59 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-06-04 19:36 UTC (permalink / raw)
  To: gcc-bugs



-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.2.0


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


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

* [Bug target/26949] [4.2 regression] worse code generated for -march=pentium4
  2006-03-30 18:26 [Bug target/26949] New: [4.2 regression] worse code generated for -march=pentium4 dann at godzilla dot ics dot uci dot edu
  2006-06-04 19:36 ` [Bug target/26949] " jsm28 at gcc dot gnu dot org
@ 2006-06-04 19:59 ` mmitchel at gcc dot gnu dot org
  2006-07-06  8:23 ` uros at kss-loka dot si
  2006-07-06  8:24 ` uros at kss-loka dot si
  3 siblings, 0 replies; 5+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 19:59 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug target/26949] [4.2 regression] worse code generated for -march=pentium4
  2006-03-30 18:26 [Bug target/26949] New: [4.2 regression] worse code generated for -march=pentium4 dann at godzilla dot ics dot uci dot edu
  2006-06-04 19:36 ` [Bug target/26949] " jsm28 at gcc dot gnu dot org
  2006-06-04 19:59 ` mmitchel at gcc dot gnu dot org
@ 2006-07-06  8:23 ` uros at kss-loka dot si
  2006-07-06  8:24 ` uros at kss-loka dot si
  3 siblings, 0 replies; 5+ messages in thread
From: uros at kss-loka dot si @ 2006-07-06  8:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from uros at kss-loka dot si  2006-07-06 08:23 -------
This problem appears to be fixed in gcc version 4.2.0 20060705 (experimental).
The generated asm for the loop is now:

-O2 -march=pentium4 -fno-tree-ch:

        jmp     .L2
.L3:
        movl    %esi, -4(%edx)
        addl    $1, %eax
.L2:
        addl    $4, %edx
        cmpl    %ecx, %eax
        jle     .L3

-O2 -march=i686 -fno-tree-ch:

        jmp     .L2
        .p2align 4,,7
.L3:
        movl    %ebx, -4(%ecx)
        addl    $1, %edx
.L2:
        addl    $4, %ecx
        cmpl    %eax, %edx
        jle     .L3

Closing the bug as FIXED.


-- 


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


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

* [Bug target/26949] [4.2 regression] worse code generated for -march=pentium4
  2006-03-30 18:26 [Bug target/26949] New: [4.2 regression] worse code generated for -march=pentium4 dann at godzilla dot ics dot uci dot edu
                   ` (2 preceding siblings ...)
  2006-07-06  8:23 ` uros at kss-loka dot si
@ 2006-07-06  8:24 ` uros at kss-loka dot si
  3 siblings, 0 replies; 5+ messages in thread
From: uros at kss-loka dot si @ 2006-07-06  8:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from uros at kss-loka dot si  2006-07-06 08:24 -------
Closing it for real...


-- 

uros at kss-loka dot si changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2006-07-06  8:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-30 18:26 [Bug target/26949] New: [4.2 regression] worse code generated for -march=pentium4 dann at godzilla dot ics dot uci dot edu
2006-06-04 19:36 ` [Bug target/26949] " jsm28 at gcc dot gnu dot org
2006-06-04 19:59 ` mmitchel at gcc dot gnu dot org
2006-07-06  8:23 ` uros at kss-loka dot si
2006-07-06  8:24 ` uros at kss-loka dot si

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