public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner)
To: gcc@gcc.gnu.org
Subject: Question on cfg_remove_useless_stmts_bb
Date: Fri, 13 Aug 2004 19:59:00 -0000	[thread overview]
Message-ID: <10408131953.AA16722@vlsi1.ultra.nyu.edu> (raw)

I'm getting a failure on c-torture/execute/930513-2.c with -O3 and what's
happening is that the out of ssa pass is looking at 

  if (j != i) goto <L1>; else goto <L2>;

    ...

<L2>:;
  i = i + 1;
  j = i;


The cfg_remove_useless_stmts_bb knows that J and I are equal.  So when it
gets to the "j = i" assignment, it deletes it.  The problem is that it
doesn't notice that "i = i + 1" clobbers the equality relation.

I don't think it's sufficient to test for an assignment to VAL here because
I think VAL can be an expression since we are no longer in GIMPLE, but
I'm not sure.

Hence my question.

I don't know why this test isn't failing for everybody, so I suspect this
is some sort of latent bug somehow.  (Or else I'm missing something,
which is quite possible.)

             reply	other threads:[~2004-08-13 19:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-13 19:59 Richard Kenner [this message]
2004-08-13 20:19 ` Diego Novillo
2004-08-17  8:26 ` Jeffrey A Law
2004-08-13 21:29 Richard Kenner
2004-08-17 12:31 Richard Kenner
2004-08-17 15:49 ` Jeffrey A Law
2004-08-17 16:49 Richard Kenner
2004-08-18  8:42 ` Jeffrey A Law
2004-08-18 11:51 Richard Kenner
2004-08-18 11:52 Richard Kenner
2004-09-01  6:22 ` Jeffrey A Law

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=10408131953.AA16722@vlsi1.ultra.nyu.edu \
    --to=kenner@vlsi1.ultra.nyu.edu \
    --cc=gcc@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).