This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC][PATCH] Fix broken handling of LABEL_REF in genrecog + genpreds.
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>, Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Date: Fri, 18 Dec 2015 09:55:54 +0000
- Subject: Re: [RFC][PATCH] Fix broken handling of LABEL_REF in genrecog + genpreds.
- Authentication-results: sourceware.org; auth=none
- References: <20151216124305 dot GA12471 at linux dot vnet dot ibm dot com>
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.
Richard