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: [RFC][PATCH] Fix broken handling of LABEL_REF in genrecog + genpreds.


Dominik Vogt <vogt@linux.vnet.ibm.com> writes:
> On Fri, Dec 18, 2015 at 09:55:54AM +0000, Richard Sandiford wrote:
>> Dominik Vogt <vogt@linux.vnet.ibm.com> writes:
>> > The attached patch fixes the handling of LABEL_REF in genrecog and
>> > genpreds.
>> >
>> > The current code assumes that X can have only a mode than PRED (X,
>> > MODE) if X is CONST_INT, CONST_DOUBLE or CONST_WIDE_INT, but
>> > actually that can be also the case for a LABEL_REF with VOIDmode.
>> > Due to this it is necessary to add "const_int" (or similar) to
>> > match_code of some predicates handling label_ref but not
>> > const_int.
>> 
>> OK, thanks.
>> 
>> As mentioned in the other thread, I think LABEL_REFs shouldn't have
>> VOIDmode, so long-term we should be fixing the targets.  I agree this
>> is the correct workaround until that happens though.
>
> All right, in the mean time the patch has passed the test suite on
> x86_64, s390x and s390.  See attached version 2 of the patch
> (added just an additional comment in genpreds.c).

This is OK too, thanks.

"matches_const_scalar_int_p" is now a bit of a misnomer (it was supposed
to be tied to CONST_SCALAR_INT_P) but I think we can live with that.
(Especially since this is supposed to be "temporary"...)

Richard


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