public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/38264] tree_forwarder_block_p says no to first basic block
Date: Fri, 26 May 2023 06:53:13 +0000	[thread overview]
Message-ID: <bug-38264-4-hBkSskDrAf@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-38264-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38264

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2012-02-02 00:00:00         |2023-5-26

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
I filed this because for

void bar ();
void foo (int n)
{
  int i = 0;
  do
    bar ();
  while (++i < n);
}

we never remove the preheader forwarder created by loop passes on GIMPLE:

void foo (int n)
{
  int i;

  <bb 2> [local count: 118111600]:

  <bb 3> [local count: 1073741824]:
  # i_1 = PHI <0(2), i_5(3)>

but if you add a bar() call before the loop we do, because the forwarder
isn't the first block then.

void foo (int n)
{
  int i;

  <bb 2> [local count: 118111600]:
  bar ();

  <bb 3> [local count: 1073741824]:
  # i_1 = PHI <0(2), i_6(3)>

  parent reply	other threads:[~2023-05-26  6:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-38264-4@http.gcc.gnu.org/bugzilla/>
2012-02-02 17:59 ` pinskia at gcc dot gnu.org
2023-05-26  0:40 ` pinskia at gcc dot gnu.org
2023-05-26  6:53 ` rguenth at gcc dot gnu.org [this message]
2023-08-26  5:47 ` pinskia at gcc dot gnu.org
2008-11-25 19:12 [Bug middle-end/38264] New: " rguenth at gcc dot gnu dot org
2008-11-25 19:12 ` [Bug middle-end/38264] " rguenth at gcc dot gnu dot org
2008-11-25 20:05 ` 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-38264-4-hBkSskDrAf@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).