public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Eric Botcazou <ebotcazou@adacore.com>,
	gcc-patches@gcc.gnu.org,
	       Kelvin Nilsen <kdnilsen@linux.vnet.ibm.com>,
	       rdsandiford@googlemail.com
Subject: Re: [PATCH] PR80101: Fix ICE in store_data_bypass_p
Date: Mon, 10 Apr 2017 21:37:00 -0000	[thread overview]
Message-ID: <20170410213636.GE4402@gate.crashing.org> (raw)
In-Reply-To: <87d1ckkvsw.fsf@googlemail.com>

On Mon, Apr 10, 2017 at 06:38:07PM +0100, Richard Sandiford wrote:
> Segher Boessenkool <segher@kernel.crashing.org> writes:
> > On Fri, Apr 07, 2017 at 10:39:03AM +0200, Eric Botcazou wrote:
> >> > Or we could just change "blockage" and wait for the next bug report.
> >> 
> >> That's my suggestion, yes.
> >> 
> >> > Alternatively, we can arrange for the bypass functions to not ICE.  We
> >> > can do that specific to these rs6000 pipeline descriptions, by having
> >> > our own version of store_data_bypass_p; or we can make that function
> >> > work for all insns (its definition works fine for insn pairs where
> >> > not both the producer and consumer are SETs).  That's what Kelvin's
> >> > patch does.  What is the value in ICEing here?
> >> 
> >> Telling the back-end writer that something may be wrong somewhere instead of 
> >> silently accepting nonsense?
> >
> > Why is it nonsense?  The predicate gives the answer to the question
> > "given these insns A and B, does A feed data that B stores in memory".
> > That is a perfectly valid question to ask of any two insns.
> 
> Agreed FWIW, but for:
> 
> @@ -3701,7 +3704,8 @@ store_data_bypass_p (rtx_insn *out_insn, rtx_insn
>              if (GET_CODE (out_exp) == CLOBBER)
>                continue;
> 
> -            gcc_assert (GET_CODE (out_exp) == SET);
> +	    if (GET_CODE (out_exp) != SET)
> +	      return false;
> 
>              if (reg_mentioned_p (SET_DEST (out_exp), SET_DEST (in_set)))
>                return false;
> 
> how about instead changing the CLOBBER check so that we continue
> when it isn't a SET?  That would allow things like UNSPECs and
> USEs as well.

Yeah that sounds good.  Kelvin, could you try that please?


Segher

  reply	other threads:[~2017-04-10 21:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 15:22 Kelvin Nilsen
2017-04-06 20:05 ` Eric Botcazou
2017-04-06 20:29   ` Segher Boessenkool
2017-04-07  6:54     ` Eric Botcazou
2017-04-07  7:48       ` Segher Boessenkool
2017-04-07  8:39         ` Eric Botcazou
2017-04-07  9:19           ` Segher Boessenkool
2017-04-10 17:38             ` Richard Sandiford
2017-04-10 21:37               ` Segher Boessenkool [this message]
2017-04-18 20:21             ` Eric Botcazou
2017-04-19 20:33               ` Segher Boessenkool
  -- strict thread matches above, loose matches on Subject: below --
2017-03-29 18:07 Kelvin Nilsen

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=20170410213636.GE4402@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kdnilsen@linux.vnet.ibm.com \
    --cc=rdsandiford@googlemail.com \
    /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).