From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32392 invoked by alias); 10 Apr 2017 21:37:06 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 32383 invoked by uid 89); 10 Apr 2017 21:37:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*Ad:U*ebotcazou, H*Ad:D*googlemail.com, our X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Apr 2017 21:37:04 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id v3ALajPE010097; Mon, 10 Apr 2017 16:36:48 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id v3ALabsh010092; Mon, 10 Apr 2017 16:36:37 -0500 Date: Mon, 10 Apr 2017 21:37:00 -0000 From: Segher Boessenkool To: Eric Botcazou , gcc-patches@gcc.gnu.org, Kelvin Nilsen , rdsandiford@googlemail.com Subject: Re: [PATCH] PR80101: Fix ICE in store_data_bypass_p Message-ID: <20170410213636.GE4402@gate.crashing.org> References: <3316696.3QEehbYcbO@polaris> <20170407074824.GU4402@gate.crashing.org> <2042575.QfhRid7aWy@polaris> <20170407091940.GV4402@gate.crashing.org> <87d1ckkvsw.fsf@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87d1ckkvsw.fsf@googlemail.com> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00491.txt.bz2 On Mon, Apr 10, 2017 at 06:38:07PM +0100, Richard Sandiford wrote: > Segher Boessenkool 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