public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/36646]  New: [4.4 regression] Unnecessary moves generated on loop boundaries
@ 2008-06-27  4:58 astrange at ithinksw dot com
  2008-06-27  4:58 ` [Bug tree-optimization/36646] " astrange at ithinksw dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: astrange at ithinksw dot com @ 2008-06-27  4:58 UTC (permalink / raw)
  To: gcc-bugs

The attached source is a loop+switch statement, where only some of the switch
cases change the variable 'val'. 4.4 generates moves for it in every case, even
the ones where it's not mentioned, while 4.2 didn't; the difference is visible
in tree dumps.

This part:
            case Op_Inc1: (*tape)++; break;

with 4.2 at -O:

<L3>:;
  *tape = *tape + 1;
  goto <bb 3> (<L0>);

L5:
        incb    (%edx)
        jmp     L13

SVN at -O:
<L3>:;
  *tape.17 = *tape.17 + 1;
  val.16 = val;
  goto <bb 3> (<L10>);

L6:
        incb    (%esi)
        movl    %edx, %eax
        jmp     L10

Suprisingly, -O3 is worse:
L6:
        movl    %edx, %eax
        incb    (%esi)
        movl    %eax, %edx
        jmp     L2

IRA doesn't improve it.
This isn't from real-world code, so it's not really important, but I'd like to
make a code-copying VM out of this.


-- 
           Summary: [4.4 regression] Unnecessary moves generated on loop
                    boundaries
           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=36646


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

* [Bug tree-optimization/36646] [4.4 regression] Unnecessary moves generated on loop boundaries
  2008-06-27  4:58 [Bug tree-optimization/36646] New: [4.4 regression] Unnecessary moves generated on loop boundaries astrange at ithinksw dot com
@ 2008-06-27  4:58 ` astrange at ithinksw dot com
  2008-06-27  5:04 ` astrange at ithinksw dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: astrange at ithinksw dot com @ 2008-06-27  4:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from astrange at ithinksw dot com  2008-06-27 04:57 -------
Created an attachment (id=15818)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15818&action=view)
testcase


-- 


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


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

* [Bug tree-optimization/36646] [4.4 regression] Unnecessary moves generated on loop boundaries
  2008-06-27  4:58 [Bug tree-optimization/36646] New: [4.4 regression] Unnecessary moves generated on loop boundaries astrange at ithinksw dot com
  2008-06-27  4:58 ` [Bug tree-optimization/36646] " astrange at ithinksw dot com
@ 2008-06-27  5:04 ` astrange at ithinksw dot com
  2008-06-27  9:24 ` [Bug tree-optimization/36646] [4.3/4.4 " rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: astrange at ithinksw dot com @ 2008-06-27  5:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from astrange at ithinksw dot com  2008-06-27 05:04 -------
Created an attachment (id=15819)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15819&action=view)
svn 20080625 + -O compile


-- 


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


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

* [Bug tree-optimization/36646] [4.3/4.4 regression] Unnecessary moves generated on loop boundaries
  2008-06-27  4:58 [Bug tree-optimization/36646] New: [4.4 regression] Unnecessary moves generated on loop boundaries astrange at ithinksw dot com
  2008-06-27  4:58 ` [Bug tree-optimization/36646] " astrange at ithinksw dot com
  2008-06-27  5:04 ` astrange at ithinksw dot com
@ 2008-06-27  9:24 ` rguenth at gcc dot gnu dot org
  2008-07-10 14:27 ` [Bug tree-optimization/36646] [4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-27  9:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-06-27 09:23 -------
This is just out-of-SSA not coalescing "properly" because of

  val_16 = val_3 + 8;
  D.2623_17 = val_3->ptr_off;

which has overlapping life-ranges for val_3 and val_16.  Earlier
compilers either didn't eliminate o in favor of val or were able
to fix this during rtl optimization.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
 GCC target triplet|i?86-*-*                    |i?86-*-*, x86_64-*-*
           Keywords|                            |missed-optimization
      Known to work|                            |4.2.4
   Last reconfirmed|0000-00-00 00:00:00         |2008-06-27 09:23:50
               date|                            |
            Summary|[4.4 regression] Unnecessary|[4.3/4.4 regression]
                   |moves generated on loop     |Unnecessary moves generated
                   |boundaries                  |on loop boundaries
   Target Milestone|---                         |4.3.2


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


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

* [Bug tree-optimization/36646] [4.3/4.4 Regression] Unnecessary moves generated on loop boundaries
  2008-06-27  4:58 [Bug tree-optimization/36646] New: [4.4 regression] Unnecessary moves generated on loop boundaries astrange at ithinksw dot com
                   ` (2 preceding siblings ...)
  2008-06-27  9:24 ` [Bug tree-optimization/36646] [4.3/4.4 " rguenth at gcc dot gnu dot org
@ 2008-07-10 14:27 ` rguenth at gcc dot gnu dot org
  2008-08-27 22:10 ` jsm28 at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-07-10 14:27 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
            Summary|[4.3/4.4 regression]        |[4.3/4.4 Regression]
                   |Unnecessary moves generated |Unnecessary moves generated
                   |on loop boundaries          |on loop boundaries


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


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

* [Bug tree-optimization/36646] [4.3/4.4 Regression] Unnecessary moves generated on loop boundaries
  2008-06-27  4:58 [Bug tree-optimization/36646] New: [4.4 regression] Unnecessary moves generated on loop boundaries astrange at ithinksw dot com
                   ` (3 preceding siblings ...)
  2008-07-10 14:27 ` [Bug tree-optimization/36646] [4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
@ 2008-08-27 22:10 ` jsm28 at gcc dot gnu dot org
  2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-08-27 22:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jsm28 at gcc dot gnu dot org  2008-08-27 22:04 -------
4.3.2 is released, changing milestones to 4.3.3.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.2                       |4.3.3


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


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

* [Bug tree-optimization/36646] [4.3/4.4 Regression] Unnecessary moves generated on loop boundaries
  2008-06-27  4:58 [Bug tree-optimization/36646] New: [4.4 regression] Unnecessary moves generated on loop boundaries astrange at ithinksw dot com
                   ` (4 preceding siblings ...)
  2008-08-27 22:10 ` jsm28 at gcc dot gnu dot org
@ 2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
  2009-08-04 12:41 ` [Bug tree-optimization/36646] [4.3/4.4/4.5 " rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 10:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2009-01-24 10:20 -------
GCC 4.3.3 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.3                       |4.3.4


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


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

* [Bug tree-optimization/36646] [4.3/4.4/4.5 Regression] Unnecessary moves generated on loop boundaries
  2008-06-27  4:58 [Bug tree-optimization/36646] New: [4.4 regression] Unnecessary moves generated on loop boundaries astrange at ithinksw dot com
                   ` (5 preceding siblings ...)
  2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
@ 2009-08-04 12:41 ` rguenth at gcc dot gnu dot org
  2009-10-20 21:10 ` astrange at ithinksw dot com
  2009-11-07  9:04 ` astrange at ithinksw dot com
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2009-08-04 12:29 -------
GCC 4.3.4 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.4                       |4.3.5


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


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

* [Bug tree-optimization/36646] [4.3/4.4/4.5 Regression] Unnecessary moves generated on loop boundaries
  2008-06-27  4:58 [Bug tree-optimization/36646] New: [4.4 regression] Unnecessary moves generated on loop boundaries astrange at ithinksw dot com
                   ` (6 preceding siblings ...)
  2009-08-04 12:41 ` [Bug tree-optimization/36646] [4.3/4.4/4.5 " rguenth at gcc dot gnu dot org
@ 2009-10-20 21:10 ` astrange at ithinksw dot com
  2009-11-07  9:04 ` astrange at ithinksw dot com
  8 siblings, 0 replies; 10+ messages in thread
From: astrange at ithinksw dot com @ 2009-10-20 21:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from astrange at ithinksw dot com  2009-10-20 21:10 -------
Tried with SVN today and it's fixed:

L6:
        incb    (%ebx)
        jmp     L12
        .align 4,0x90

Close if you want; I don't think it's worth finding when this happened.


-- 


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


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

* [Bug tree-optimization/36646] [4.3/4.4/4.5 Regression] Unnecessary moves generated on loop boundaries
  2008-06-27  4:58 [Bug tree-optimization/36646] New: [4.4 regression] Unnecessary moves generated on loop boundaries astrange at ithinksw dot com
                   ` (7 preceding siblings ...)
  2009-10-20 21:10 ` astrange at ithinksw dot com
@ 2009-11-07  9:04 ` astrange at ithinksw dot com
  8 siblings, 0 replies; 10+ messages in thread
From: astrange at ithinksw dot com @ 2009-11-07  9:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from astrange at ithinksw dot com  2009-11-07 09:03 -------
Closing.


-- 

astrange at ithinksw dot com changed:

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


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


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

end of thread, other threads:[~2009-11-07  9:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-27  4:58 [Bug tree-optimization/36646] New: [4.4 regression] Unnecessary moves generated on loop boundaries astrange at ithinksw dot com
2008-06-27  4:58 ` [Bug tree-optimization/36646] " astrange at ithinksw dot com
2008-06-27  5:04 ` astrange at ithinksw dot com
2008-06-27  9:24 ` [Bug tree-optimization/36646] [4.3/4.4 " rguenth at gcc dot gnu dot org
2008-07-10 14:27 ` [Bug tree-optimization/36646] [4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
2008-08-27 22:10 ` jsm28 at gcc dot gnu dot org
2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
2009-08-04 12:41 ` [Bug tree-optimization/36646] [4.3/4.4/4.5 " rguenth at gcc dot gnu dot org
2009-10-20 21:10 ` astrange at ithinksw dot com
2009-11-07  9:04 ` astrange at ithinksw dot com

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