public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Eric Botcazou <ebotcazou@adacore.com>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH][20/n] Remove GENERIC stmt combining from SCCVN
Date: Tue, 15 Sep 2015 07:43:00 -0000	[thread overview]
Message-ID: <1774210.e63F4YTsBa@polaris> (raw)
In-Reply-To: <alpine.LSU.2.11.1509141144050.13444@zhemvz.fhfr.qr>

> > That's old code and the comment makes it quite clear why this is done
> > though.
>
> Yeah, but then here "we don't need to evaluate it just for the check"
> applies - the check is dead code as the outer comparison is always
> false.  I think what the code in the Ada frontend tries to achieve
> is not actually what it does.  Or the testcase is invalid (or rather
> dependent on optimization performed).

I think that the testcase is valid (it is derived from a DEC Ada test written 
circa 1990).  But, yes, the quoted gigi code wants to implement the famous 
11.6 clause, whereby a check need not be raised if the expression is dead.
The problem here is that the expression drives a conditional construct with 
side effects, so it cannot be considered as dead.

In the end, the code indeed appears to be incorrect in resetting the flag.
Instead the implementation of the 11.6 clause should rely purely on the 
optimizers and -fdelete-dead-exceptions.

Thanks for your help to analyze this.

-- 
Eric Botcazou

  reply	other threads:[~2015-09-15  7:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 12:45 Richard Biener
2015-09-12 16:35 ` Eric Botcazou
2015-09-14  8:52   ` Richard Biener
2015-09-14  9:00     ` Richard Biener
2015-09-14  9:47       ` Eric Botcazou
2015-09-14  9:57         ` Richard Biener
2015-09-15  7:43           ` Eric Botcazou [this message]
2015-09-14  9:05     ` Eric Botcazou

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=1774210.e63F4YTsBa@polaris \
    --to=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).