public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/19038] [4.0 Regression] out-of ssa causing loops to have more than one BB
Date: Fri, 24 Dec 2004 12:42:00 -0000	[thread overview]
Message-ID: <20041224124217.19468.qmail@sourceware.org> (raw)
In-Reply-To: <20041216155140.19038.dje@gcc.gnu.org>


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-24 12:42 -------
A smaller test case:

int
f (int temp2, int xlvj_)
{
  int temp1;
 
  for(;;) {
    temp1 = temp2*xlvj_;
    temp2 = temp1;
    if (temp1)
      break;
  }
  return xlvj_;
}
                                                                               
               

After out-of-ssa this gives the following tree dump:

;; Function f (f)
                                                                               
               
Analyzing Edge Insertions.
f (temp2, xlvj_)
{
  int temp1;
  int D.1471;
                                                                               
               
<L4>:;
                                                                               
               
<L0>:;
  temp1 = temp2 * xlvj_;
  if (temp1 != 0) goto <L2>; else goto <L7>;
                                                                               
               
<L7>:;
  temp2 = temp1;
  goto <bb 1> (<L0>);
                                                                               
               
<L2>:;
  return xlvj_;
                                                                               
               
}



As far as I can tell the following test case is semantically
equivalent to the one above:

int
f (int temp2, int xlvj_)
{
  for(;;) {
    temp2 = temp2*xlvj_;
    if (temp2)
      break;
  }
  return xlvj_;
}

But the tree dumps are definitely not the same, in the smaller
test case we don't have the extra copy:

;; Function f (f)
                                                                               
               
Analyzing Edge Insertions.
f (temp2, xlvj_)
{
  int D.1470;
                                                                               
               
<L4>:;
                                                                               
               
<L0>:;
  temp2 = temp2 * xlvj_;
  if (temp2 != 0) goto <L2>; else goto <L0>;
                                                                               
               
<L2>:;
  return xlvj_;
                                                                               
               
}

So apparently something is preventing temp1 and temp2 from being
coalesced when going out of ssa.


-- 


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


  parent reply	other threads:[~2004-12-24 12:42 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-16 15:52 [Bug rtl-optimization/19038] New: Loop header copying dje at gcc dot gnu dot org
2004-12-16 21:39 ` [Bug rtl-optimization/19038] " dje at gcc dot gnu dot org
2004-12-16 22:55 ` steven at gcc dot gnu dot org
2004-12-17  4:04 ` pinskia at gcc dot gnu dot org
2004-12-17  4:05 ` pinskia at gcc dot gnu dot org
2004-12-17  4:16 ` pinskia at gcc dot gnu dot org
2004-12-17  4:28 ` pinskia at gcc dot gnu dot org
2004-12-20 18:25 ` [Bug tree-optimization/19038] [4.0 Regression] out-of ssa causing loops to have more than one BB pinskia at gcc dot gnu dot org
2004-12-20 19:04 ` pinskia at gcc dot gnu dot org
2004-12-20 19:23 ` pinskia at gcc dot gnu dot org
2004-12-20 19:47 ` pinskia at gcc dot gnu dot org
2004-12-22 19:03 ` steven at gcc dot gnu dot org
2004-12-23  2:41 ` pinskia at gcc dot gnu dot org
2004-12-23 15:19 ` dje at gcc dot gnu dot org
2004-12-23 16:00 ` steven at gcc dot gnu dot org
2004-12-24 12:13 ` mustafa at il dot ibm dot com
2004-12-24 12:42 ` steven at gcc dot gnu dot org [this message]
2004-12-24 12:46 ` steven at gcc dot gnu dot org
2004-12-24 12:52 ` steven at gcc dot gnu dot org
2004-12-24 12:55 ` steven at gcc dot gnu dot org
2004-12-26  1:09 ` dberlin at gcc dot gnu dot org
2004-12-26 15:06 ` pinskia at gcc dot gnu dot org
2004-12-27 21:08 ` law at redhat dot com
2004-12-28  8:22 ` law at redhat dot com
2004-12-28  9:18 ` law at redhat dot com
2004-12-28 23:32 ` law at redhat dot com
2004-12-29 19:33 ` steven at gcc dot gnu dot org
2004-12-29 20:50 ` pinskia at gcc dot gnu dot org
2004-12-29 20:52 ` pinskia at gcc dot gnu dot org
2004-12-29 21:06 ` law at redhat dot com
2004-12-30 17:27 ` pinskia at gcc dot gnu dot org
2004-12-30 18:39 ` law at redhat dot com
2004-12-30 18:49 ` pinskia at gcc dot gnu dot org
2004-12-30 21:51 ` pinskia at gcc dot gnu dot org
2005-01-04  4:04 ` law at redhat dot com
2005-01-04  4:10 ` pinskia at gcc dot gnu dot org
2005-01-10 20:02 ` pinskia at gcc dot gnu dot org
2005-01-12 13:34 ` amacleod at redhat dot com
2005-01-18  0:50 ` [Bug tree-optimization/19038] [4.0 Regression] ivopts " pinskia at gcc dot gnu dot org
2005-01-18  5:02 ` law at redhat dot com
2005-01-19 22:50 ` cvs-commit at gcc dot gnu dot org
2005-01-19 23:25 ` [Bug tree-optimization/19038] [4.0 Regression] out of ssa " pinskia at gcc dot gnu dot org
2005-01-19 23:34 ` pinskia at gcc dot gnu dot org
2005-01-20  0:31 ` pinskia at gcc dot gnu dot org
2005-01-20  0:47 ` pinskia at gcc dot gnu dot org
2005-01-20  1:15 ` pinskia at gcc dot gnu dot org
2005-01-21 13:18 ` steven at gcc dot gnu dot org
2005-01-21 13:22 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-21 13:27 ` steven at gcc dot gnu dot org
2005-01-21 13:29 ` [Bug tree-optimization/19038] [4.0 Regression] tree-ssa " steven at gcc dot gnu dot org
2005-01-21 19:19 ` dberlin at gcc dot gnu dot org
2005-01-22  1:51 ` dberlin at gcc dot gnu dot org
2005-01-22 16:48 ` cvs-commit at gcc dot gnu dot org
2005-01-22 16:49 ` dberlin at gcc dot gnu dot org

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