public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ibolton at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/43491] Unnecessary temporary for global register variable
Date: Wed, 08 Sep 2010 16:22:00 -0000	[thread overview]
Message-ID: <20100908162150.11095.qmail@sourceware.org> (raw)
In-Reply-To: <bug-43491-18939@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from ibolton at gcc dot gnu dot org  2010-09-08 16:21 -------
reg is assigned to a temporary (reg.0) at the very first tree pass, as shown by
this 004t.gimple dump:

d ()
{
  struct b * const reg.0;
  unsigned int * D.2019;
  int D.2020;

  goto <D.1276>;
  <D.1275>:
  c ();
  <D.1276>:
  reg.0 = reg;
  D.2019 = &reg.0->j;
  D.2020 = diff (D.2019);
  if (D.2020 != 0) goto <D.1275>; else goto <D.1277>;
  <D.1277>:
}

I'm thinking that this is perfectly normal thing to do, and that the redundant
move is meant to disappear in a later pass.  My guess is that IRA is choosing
not to assign the pseudo to r4, but I do not know why at the moment.


-- 

ibolton at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |missed-optimization, ra
      Known to fail|                            |4.5.3 4.6.0
   Last reconfirmed|0000-00-00 00:00:00         |2010-09-08 16:21:50
               date|                            |


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


  reply	other threads:[~2010-09-08 16:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 14:21 [Bug rtl-optimization/43491] New: " mirq-gccboogs at rere dot qmqm dot pl
2010-09-08 16:22 ` ibolton at gcc dot gnu dot org [this message]
     [not found] <bug-43491-4@http.gcc.gnu.org/bugzilla/>
2011-11-23  8:35 ` [Bug rtl-optimization/43491] " amker.cheng at gmail dot com
2011-11-24 10:22 ` amker.cheng at gmail dot com
2011-12-21  4:35 ` amker.cheng at gmail 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=20100908162150.11095.qmail@sourceware.org \
    --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).