public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/37490]  New: [4.4 Regression] IRA causes FP code to have more spills
Date: Thu, 11 Sep 2008 23:46:00 -0000	[thread overview]
Message-ID: <bug-37490-6528@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2008-09-11 23:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-11 23:46 pinskia at gcc dot gnu dot org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-37490-6528@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).