public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/37490]  New: [4.4 Regression] IRA causes FP code to have more spills
@ 2008-09-11 23:46 pinskia at gcc dot gnu dot org
  2008-09-11 23:46 ` [Bug rtl-optimization/37490] " pinskia at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-11 23:46 UTC (permalink / raw)
  To: gcc-bugs

I had quickly looked at PR 37488 and decided to try it out on PPC and noticed
that IRA generates worse code than what was being generated before.
Here is a simple testcase which does not have any indirect gotos in it:
void g(void);
const void* test(int action, void* ptr, int a, int *b)
{
   if (action == 0) {
      return 0;
   } else {
      char* ip = ptr;
      double reg_f_a;
      double reg_f[1];
      reg_f_a = 0.0;
      reg_f[0] = 0.0;
      if(a) goto L2;
L1: {
      int t1 = *(int*)(++ip);
      reg_f_a = reg_f_a + reg_f[t1];
      g();
      if(*(++b)) goto L1;
   }
L2:
      g();
      *(double*)ptr = reg_f_a;
   }
   return 0;
}

--- CUT ---
-       fmr 31,0
+       std 0,128(1)
+       lfd 31,128(1)

-       fmr 31,0
-       mr 31,4
-       addi 29,1,112
+       std 0,128(1)
+       mr 29,4
+       lfd 31,128(1)
+       addi 28,1,112

For some reason IRA decides it is better to use the GPRs for 0.0 than it is to
use the FPRs.


-- 
           Summary: [4.4 Regression] IRA causes FP code to have more spills
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


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

* [Bug rtl-optimization/37490] [4.4 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
@ 2008-09-11 23:46 ` pinskia at gcc dot gnu dot org
  2008-09-11 23:49 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-11 23:46 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.4.0


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


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

* [Bug rtl-optimization/37490] [4.4 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
  2008-09-11 23:46 ` [Bug rtl-optimization/37490] " pinskia at gcc dot gnu dot org
@ 2008-09-11 23:49 ` pinskia at gcc dot gnu dot org
  2008-09-11 23:55 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-11 23:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-09-11 23:47 -------
I forgot to mention, not choosing a FLOAT_REG causes a reload to happen which
did not happen before.


-- 


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


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

* [Bug rtl-optimization/37490] [4.4 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
  2008-09-11 23:46 ` [Bug rtl-optimization/37490] " pinskia at gcc dot gnu dot org
  2008-09-11 23:49 ` pinskia at gcc dot gnu dot org
@ 2008-09-11 23:55 ` pinskia at gcc dot gnu dot org
  2008-09-13 12:43 ` rguenth at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-11 23:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-09-11 23:54 -------
The exact revision I was using is:
gcc version 4.4.0 20080910 (experimental) [trunk revision 140245] (GCC) 


-- 


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


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

* [Bug rtl-optimization/37490] [4.4 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-09-11 23:55 ` pinskia at gcc dot gnu dot org
@ 2008-09-13 12:43 ` rguenth at gcc dot gnu dot org
  2008-10-22  3:11 ` mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-13 12:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-09-13 12:41 -------
Did you made sure that this is not a ppc machine/cost description problem?


-- 


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


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

* [Bug rtl-optimization/37490] [4.4 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-09-13 12:43 ` rguenth at gcc dot gnu dot org
@ 2008-10-22  3:11 ` mmitchel at gcc dot gnu dot org
  2008-12-24 23:03 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2008-10-22  3:11 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=37490


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

* [Bug rtl-optimization/37490] [4.4 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-10-22  3:11 ` mmitchel at gcc dot gnu dot org
@ 2008-12-24 23:03 ` pinskia at gcc dot gnu dot org
  2009-02-16  9:12 ` bonzini at gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-24 23:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2008-12-24 23:00 -------
(In reply to comment #3)
> Did you made sure that this is not a ppc machine/cost description problem?

This sounds like what the patch which I mentioned in 
http://gcc.gnu.org/ml/gcc-patches/2008-10/msg01323.html .

In fact that patch was to solve the same issue with the old register allocator
where 0.0 would be put into the GPR.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ra


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


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

* [Bug rtl-optimization/37490] [4.4 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-12-24 23:03 ` pinskia at gcc dot gnu dot org
@ 2009-02-16  9:12 ` bonzini at gnu dot org
  2009-02-17 20:48 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bonzini at gnu dot org @ 2009-02-16  9:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from bonzini at gnu dot org  2009-02-16 09:12 -------
This looks target-dependent, isn't it?


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bonzini at gnu dot org


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


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

* [Bug rtl-optimization/37490] [4.4 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-02-16  9:12 ` bonzini at gnu dot org
@ 2009-02-17 20:48 ` pinskia at gcc dot gnu dot org
  2009-04-21 15:59 ` [Bug rtl-optimization/37490] [4.4/4.5 " jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-02-17 20:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2009-02-17 20:48 -------
(In reply to comment #5)
> This looks target-dependent, isn't it?

It might be but the older RA was able to handle this better.  Look at the patch
and the decision that follows.


-- 


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


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

* [Bug rtl-optimization/37490] [4.4/4.5 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-02-17 20:48 ` pinskia at gcc dot gnu dot org
@ 2009-04-21 15:59 ` jakub at gcc dot gnu dot org
  2009-07-22 10:35 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-04-21 15:59 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.4.0                       |4.4.1


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


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

* [Bug rtl-optimization/37490] [4.4/4.5 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2009-04-21 15:59 ` [Bug rtl-optimization/37490] [4.4/4.5 " jakub at gcc dot gnu dot org
@ 2009-07-22 10:35 ` jakub at gcc dot gnu dot org
  2009-10-15 12:54 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-07-22 10:35 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.4.1                       |4.4.2


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


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

* [Bug rtl-optimization/37490] [4.4/4.5 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2009-07-22 10:35 ` jakub at gcc dot gnu dot org
@ 2009-10-15 12:54 ` jakub at gcc dot gnu dot org
  2010-01-21 13:15 ` jakub at gcc dot gnu dot org
  2010-02-25 18:56 ` law at redhat dot com
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-10-15 12:54 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.4.2                       |4.4.3


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


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

* [Bug rtl-optimization/37490] [4.4/4.5 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2009-10-15 12:54 ` jakub at gcc dot gnu dot org
@ 2010-01-21 13:15 ` jakub at gcc dot gnu dot org
  2010-02-25 18:56 ` law at redhat dot com
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-01-21 13:15 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.4.3                       |4.4.4


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


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

* [Bug rtl-optimization/37490] [4.4/4.5 Regression] IRA causes FP code to have more spills
  2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2010-01-21 13:15 ` jakub at gcc dot gnu dot org
@ 2010-02-25 18:56 ` law at redhat dot com
  12 siblings, 0 replies; 14+ messages in thread
From: law at redhat dot com @ 2010-02-25 18:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from law at redhat dot com  2010-02-25 18:55 -------
I'm not a PPC expert, but the code looks pretty good at this point.    I'd have
to assume Vlad's patch for 37488 and possibly other follow-on work resulted in
the improvements.  I'm closing this PR as resolved.  If you feel it should be
kept open, feel free to re-open it.


-- 

law at redhat dot com changed:

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


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


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

end of thread, other threads:[~2010-02-25 18:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-11 23:46 [Bug rtl-optimization/37490] New: [4.4 Regression] IRA causes FP code to have more spills pinskia at gcc dot gnu dot org
2008-09-11 23:46 ` [Bug rtl-optimization/37490] " pinskia at gcc dot gnu dot org
2008-09-11 23:49 ` pinskia at gcc dot gnu dot org
2008-09-11 23:55 ` pinskia at gcc dot gnu dot org
2008-09-13 12:43 ` rguenth at gcc dot gnu dot org
2008-10-22  3:11 ` mmitchel at gcc dot gnu dot org
2008-12-24 23:03 ` pinskia at gcc dot gnu dot org
2009-02-16  9:12 ` bonzini at gnu dot org
2009-02-17 20:48 ` pinskia at gcc dot gnu dot org
2009-04-21 15:59 ` [Bug rtl-optimization/37490] [4.4/4.5 " jakub at gcc dot gnu dot org
2009-07-22 10:35 ` jakub at gcc dot gnu dot org
2009-10-15 12:54 ` jakub at gcc dot gnu dot org
2010-01-21 13:15 ` jakub at gcc dot gnu dot org
2010-02-25 18:56 ` law at redhat 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).