public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6/4.7 regression] loop invariant motion causes stack spill
       [not found] <bug-39839-4@http.gcc.gnu.org/bugzilla/>
@ 2011-06-24 14:58 ` steven at gcc dot gnu.org
  2011-06-24 17:12 ` [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu.org @ 2011-06-24 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |steven at gcc dot gnu.org

--- Comment #16 from Steven Bosscher <steven at gcc dot gnu.org> 2011-06-24 14:57:12 UTC ---
So this is fixed??


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

* [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 regression] loop invariant motion causes stack spill
       [not found] <bug-39839-4@http.gcc.gnu.org/bugzilla/>
  2011-06-24 14:58 ` [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6/4.7 regression] loop invariant motion causes stack spill steven at gcc dot gnu.org
@ 2011-06-24 17:12 ` rguenth at gcc dot gnu.org
  2011-06-27 14:52 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-24 17:12 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.7.0
            Summary|[4.3/4.4/4.5/4.6/4.7        |[4.3/4.4/4.5/4.6
                   |regression] loop invariant  |regression] loop invariant
                   |motion causes stack spill   |motion causes stack spill

--- Comment #17 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-24 17:11:01 UTC ---
At least for 4.7 it seems.


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

* [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 regression] loop invariant motion causes stack spill
       [not found] <bug-39839-4@http.gcc.gnu.org/bugzilla/>
  2011-06-24 14:58 ` [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6/4.7 regression] loop invariant motion causes stack spill steven at gcc dot gnu.org
  2011-06-24 17:12 ` [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu.org
@ 2011-06-27 14:52 ` rguenth at gcc dot gnu.org
  2012-03-13 15:23 ` [Bug tree-optimization/39839] [4.5/4.6 " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-27 14:52 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.6                       |4.4.7

--- Comment #18 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-27 12:14:33 UTC ---
4.3 branch is being closed, moving to 4.4.7 target.


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

* [Bug tree-optimization/39839] [4.5/4.6 regression] loop invariant motion causes stack spill
       [not found] <bug-39839-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-06-27 14:52 ` rguenth at gcc dot gnu.org
@ 2012-03-13 15:23 ` jakub at gcc dot gnu.org
  2012-07-02 11:53 ` rguenth at gcc dot gnu.org
  2013-04-12 16:18 ` [Bug tree-optimization/39839] [4.6 " jakub at gcc dot gnu.org
  5 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-13 15:23 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.4.7                       |4.5.4

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-13 12:48:01 UTC ---
4.4 branch is being closed, moving to 4.5.4 target.


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

* [Bug tree-optimization/39839] [4.5/4.6 regression] loop invariant motion causes stack spill
       [not found] <bug-39839-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2012-03-13 15:23 ` [Bug tree-optimization/39839] [4.5/4.6 " jakub at gcc dot gnu.org
@ 2012-07-02 11:53 ` rguenth at gcc dot gnu.org
  2013-04-12 16:18 ` [Bug tree-optimization/39839] [4.6 " jakub at gcc dot gnu.org
  5 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-02 11:53 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.4                       |4.6.4

--- Comment #20 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-02 11:52:15 UTC ---
The 4.5 branch is being closed, adjusting target milestone.


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

* [Bug tree-optimization/39839] [4.6 regression] loop invariant motion causes stack spill
       [not found] <bug-39839-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2012-07-02 11:53 ` rguenth at gcc dot gnu.org
@ 2013-04-12 16:18 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 16:18 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.6.4                       |4.7.0

--- Comment #21 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 16:17:50 UTC ---
The 4.6 branch has been closed, fixed in GCC 4.7.0.


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

* [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 regression] loop invariant motion causes stack spill
  2009-04-21 18:27 [Bug regression/39839] New: [4.3/4.4/4.5 " alexvod at google dot com
                   ` (5 preceding siblings ...)
  2010-07-13 16:14 ` sandra at codesourcery dot com
@ 2010-07-23  2:18 ` sandra at gcc dot gnu dot org
  6 siblings, 0 replies; 13+ messages in thread
From: sandra at gcc dot gnu dot org @ 2010-07-23  2:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from sandra at gcc dot gnu dot org  2010-07-23 02:18 -------
Subject: Bug 39839

Author: sandra
Date: Fri Jul 23 02:18:07 2010
New Revision: 162438

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162438
Log:
2010-07-22  Sandra Loosemore  <sandra@codesourcery.com>

        PR tree-optimization/39839

        gcc/testsuite/
        * gcc.target/arm/pr39839.c: New test case.

Added:
    trunk/gcc/testsuite/gcc.target/arm/pr39839.c
Modified:
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 regression] loop invariant motion causes stack spill
  2009-04-21 18:27 [Bug regression/39839] New: [4.3/4.4/4.5 " alexvod at google dot com
                   ` (4 preceding siblings ...)
  2010-07-11  1:22 ` sandra at codesourcery dot com
@ 2010-07-13 16:14 ` sandra at codesourcery dot com
  2010-07-23  2:18 ` sandra at gcc dot gnu dot org
  6 siblings, 0 replies; 13+ messages in thread
From: sandra at codesourcery dot com @ 2010-07-13 16:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from sandra at codesourcery dot com  2010-07-13 16:13 -------
There are two patches that made the difference:  r158189 (Carrot's patch for
PR42601) and r162043 (the second part of my patch for PR42505).  I checked that
backporting these two changes to the 4.5 branch is sufficient to fix the code
size regression on this example there, too.

I posted the test case patch here:
http://gcc.gnu.org/ml/gcc-patches/2010-07/msg01070.html


-- 


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


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

* [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 regression] loop invariant motion causes stack spill
  2009-04-21 18:27 [Bug regression/39839] New: [4.3/4.4/4.5 " alexvod at google dot com
                   ` (3 preceding siblings ...)
  2010-06-22 18:02 ` sandra at codesourcery dot com
@ 2010-07-11  1:22 ` sandra at codesourcery dot com
  2010-07-13 16:14 ` sandra at codesourcery dot com
  2010-07-23  2:18 ` sandra at gcc dot gnu dot org
  6 siblings, 0 replies; 13+ messages in thread
From: sandra at codesourcery dot com @ 2010-07-11  1:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from sandra at codesourcery dot com  2010-07-11 01:22 -------
Some further analysis:

The part of my PR42505 patch that made the difference was the change to
estimate_register_pressure_cost in cfgloopanal.c, to make it exclude the
call-clobbered registers.  This part was finally committed separately in a
revised version as r162043.

I'm still looking into what to do about the test case and 4.5 backport.


-- 


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


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

* [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 regression] loop invariant motion causes stack spill
  2009-04-21 18:27 [Bug regression/39839] New: [4.3/4.4/4.5 " alexvod at google dot com
                   ` (2 preceding siblings ...)
  2010-06-22 17:29 ` bonzini at gnu dot org
@ 2010-06-22 18:02 ` sandra at codesourcery dot com
  2010-07-11  1:22 ` sandra at codesourcery dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: sandra at codesourcery dot com @ 2010-06-22 18:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from sandra at codesourcery dot com  2010-06-22 18:02 -------
Hrmmm, I was planning to attempt a 4.5 backport of the PR42505 patch for
internal use, but if it's not easy or doesn't help, I think I have better
things to do with my time than to try to come up with some other fix.  ;-)  So,
let's wait and see.


-- 


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


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

* [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 regression] loop invariant motion causes stack spill
  2009-04-21 18:27 [Bug regression/39839] New: [4.3/4.4/4.5 " alexvod at google dot com
  2010-05-22 18:32 ` [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org
  2010-06-22 16:27 ` sandra at codesourcery dot com
@ 2010-06-22 17:29 ` bonzini at gnu dot org
  2010-06-22 18:02 ` sandra at codesourcery dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: bonzini at gnu dot org @ 2010-06-22 17:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from bonzini at gnu dot org  2010-06-22 17:28 -------
That would be WONTFIX for 4.5 and earlier, right?  4.4 and earlier are
definitely out of question, but maybe your patch alone gives the same effect on
4.5 branch too, without any of the other ivopts and ARM improvements that
recently went into 4.6?


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |42505


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


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

* [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 regression] loop invariant motion causes stack spill
  2009-04-21 18:27 [Bug regression/39839] New: [4.3/4.4/4.5 " alexvod at google dot com
  2010-05-22 18:32 ` [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org
@ 2010-06-22 16:27 ` sandra at codesourcery dot com
  2010-06-22 17:29 ` bonzini at gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: sandra at codesourcery dot com @ 2010-06-22 16:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from sandra at codesourcery dot com  2010-06-22 16:26 -------
It looks like this bug has been fixed by my proposed patch for PR42505:

http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01920.html

Applying that patch to r160755 gives:

00000000 <test>:
   0:   b570            push    {r4, r5, r6, lr}
   2:   4d0c            ldr     r5, [pc, #48]   ; (34 <test+0x34>)
   4:   1c04            adds    r4, r0, #0
   6:   6806            ldr     r6, [r0, #0]
   8:   447d            add     r5, pc
   a:   e00f            b.n     2c <test+0x2c>
   c:   6861            ldr     r1, [r4, #4]
   e:   1c2b            adds    r3, r5, #0
  10:   780a            ldrb    r2, [r1, #0]
  12:   2a00            cmp     r2, #0
  14:   d101            bne.n   1a <test+0x1a>
  16:   4b08            ldr     r3, [pc, #32]   ; (38 <test+0x38>)
  18:   447b            add     r3, pc
  1a:   4808            ldr     r0, [pc, #32]   ; (3c <test+0x3c>)
  1c:   1989            adds    r1, r1, r6
  1e:   4478            add     r0, pc
  20:   1c32            adds    r2, r6, #0
  22:   f7ff fffe       bl      0 <func>
  26:   6823            ldr     r3, [r4, #0]
  28:   3b01            subs    r3, #1
  2a:   6023            str     r3, [r4, #0]
  2c:   6823            ldr     r3, [r4, #0]
  2e:   2b00            cmp     r3, #0
  30:   daec            bge.n   c <test+0xc>
  32:   bd70            pop     {r4, r5, r6, pc}
  34:   00000028        .word   0x00000028
  38:   0000001c        .word   0x0000001c
  3c:   0000001a        .word   0x0000001a

So, back down to 64 bytes of code, and no spills to stack.

Assuming the PR42505 patch is approved, probably the only thing required to
close this issue is checking in the additional test case.


-- 

sandra at codesourcery dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sandra at codesourcery dot
                   |                            |com


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


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

* [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 regression] loop invariant motion causes stack spill
  2009-04-21 18:27 [Bug regression/39839] New: [4.3/4.4/4.5 " alexvod at google dot com
@ 2010-05-22 18:32 ` rguenth at gcc dot gnu dot org
  2010-06-22 16:27 ` sandra at codesourcery dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-22 18:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2010-05-22 18:13 -------
GCC 4.3.5 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2013-04-12 16:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-39839-4@http.gcc.gnu.org/bugzilla/>
2011-06-24 14:58 ` [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6/4.7 regression] loop invariant motion causes stack spill steven at gcc dot gnu.org
2011-06-24 17:12 ` [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu.org
2011-06-27 14:52 ` rguenth at gcc dot gnu.org
2012-03-13 15:23 ` [Bug tree-optimization/39839] [4.5/4.6 " jakub at gcc dot gnu.org
2012-07-02 11:53 ` rguenth at gcc dot gnu.org
2013-04-12 16:18 ` [Bug tree-optimization/39839] [4.6 " jakub at gcc dot gnu.org
2009-04-21 18:27 [Bug regression/39839] New: [4.3/4.4/4.5 " alexvod at google dot com
2010-05-22 18:32 ` [Bug tree-optimization/39839] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org
2010-06-22 16:27 ` sandra at codesourcery dot com
2010-06-22 17:29 ` bonzini at gnu dot org
2010-06-22 18:02 ` sandra at codesourcery dot com
2010-07-11  1:22 ` sandra at codesourcery dot com
2010-07-13 16:14 ` sandra at codesourcery dot com
2010-07-23  2:18 ` sandra 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).