This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR80101: Fix ICE in store_data_bypass_p


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.

Thanks,
Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]