public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/28545] [4.1 Regression] Wrong code for hoisted multiplication
Date: Sat, 14 Oct 2006 10:41:00 -0000	[thread overview]
Message-ID: <20061014104052.6987.qmail@sourceware.org> (raw)
In-Reply-To: <bug-28545-7172@http.gcc.gnu.org/bugzilla/>



------- Comment #9 from rguenth at gcc dot gnu dot org  2006-10-14 10:40 -------
Much simpler testcase:

void foo(int);
void solver(int cr)
{
  int x, y, n;

  for (y = 0; y < cr; y++)
    for (x = 0; x < cr; x++) {
      for (n = 0; n < cr; n++)
        ;
      foo(cr*cr);
    }
}

t35.copyprop1:

;; Function solver (solver)

solver (cr)
{
  int n;
  int y;
  int x;
  int D.1293;

<bb 0>:
  goto <bb 6> (<L7>);

<L2>:;
  n_11 = n_3 + 1;

  # n_3 = PHI <0(4), n_11(1)>;
<L3>:;
  if (n_3 < cr_5) goto <L2>; else goto <L4>;

<L4>:;
  D.1293_9 = cr_5 * cr_5;
  foo (D.1293_9);
  x_10 = x_1 + 1;

  # x_1 = PHI <0(6), x_10(3)>;
<L5>:;
  if (x_1 < cr_5) goto <L3>; else goto <L6>;

<L6>:;
  y_7 = y_2 + 1;

  # y_2 = PHI <0(0), y_7(5)>;
<L7>:;
  if (y_2 < cr_5) goto <L5>; else goto <L8>;

<L8>:;
  return;

}

t36.vrp1:

solver (cr)
{
  int n;
  int y;
  int x;
  int D.1293;

<bb 0>:
  goto <bb 6> (<L7>);

<L2>:;
  n_11 = n_3 + 1;

  # n_3 = PHI <0(4), n_11(1)>;
<L3>:;
  if (n_3 < cr_5) goto <L2>; else goto <L4>;

<L4>:;
  D.1293_9 = cr_5 * cr_13;
  foo (D.1293_9);
  x_10 = x_1 + 1;

  # x_1 = PHI <0(6), x_10(3)>;
<L5>:;
  if (x_1 < cr_5) goto <L3>; else goto <L6>;

<L6>:;
  y_7 = y_2 + 1;

  # y_2 = PHI <0(0), y_7(5)>;
<L7>:;
  if (y_2 < cr_5) goto <L5>; else goto <L8>;

<L8>:;
  return;

}


(this smells like a tree sharing issue).


-- 


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


  parent reply	other threads:[~2006-10-14 10:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-30 18:42 [Bug c/28545] New: " ben at decadentplace dot org dot uk
2006-07-30 18:46 ` [Bug c/28545] " ben at decadentplace dot org dot uk
2006-07-30 19:02 ` [Bug middle-end/28545] " ben at decadentplace dot org dot uk
2006-07-30 19:05 ` [Bug middle-end/28545] [4.1 only] " pinskia at gcc dot gnu dot org
2006-07-30 20:11 ` ben at decadentplace dot org dot uk
2006-07-31  1:41 ` pinskia at gcc dot gnu dot org
2006-07-31  8:23 ` [Bug middle-end/28545] [4.1 Regression] " rguenth at gcc dot gnu dot org
2006-10-14  9:26 ` rguenth at gcc dot gnu dot org
2006-10-14 10:19 ` rguenth at gcc dot gnu dot org
2006-10-14 10:41 ` rguenth at gcc dot gnu dot org [this message]
2006-10-14 11:11 ` rguenth at gcc dot gnu dot org
2006-10-14 14:49 ` rguenth at gcc dot gnu dot org
2006-10-14 15:05 ` patchapp at dberlin dot org
2006-10-14 15:13 ` pinskia at gcc dot gnu dot org
2006-10-14 16:08 ` [Bug tree-optimization/28545] " pinskia at gcc dot gnu dot org
2006-10-14 16:09 ` pinskia at gcc dot gnu dot org
2006-10-16 14:36 ` amacleod at redhat dot com
2006-11-01 18:15 ` mmitchel at gcc dot gnu dot org
2006-11-06 15:15 ` rguenth at gcc dot gnu dot org
2006-11-06 15:17 ` rguenth at gcc dot gnu dot org
2006-11-07 19:37 ` pinskia at gcc dot gnu dot org
2006-11-12  1:49 ` pinskia at gcc dot gnu dot org
2006-11-12  1:49 ` pinskia at gcc dot gnu dot org
2007-01-14  6:07 ` pinskia 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=20061014104052.6987.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).