This is the mail archive of the
mailing list for the GCC project.
Re: Avoiding paradoxical subregs
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Paulo Matos <pmatos at broadcom dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 17 Jan 2014 17:22:55 +0100
- Subject: Re: Avoiding paradoxical subregs
- Authentication-results: sourceware.org; auth=none
- References: <19EB96622A777C4AB91610E763265F463EB9B3 at SJEXCHMB14 dot corp dot ad dot broadcom dot com>
> I can use canonicalize_comparison like s390 to remove the subreg, however
> the question then becomes about how to avoid this in general. We cannot
> allow a zero_extend to become a paradoxical subreg and then have the subreg
> discarded. Most of our instructions are vector instructions which will
> change the remainder of the register.
> I have defined WORD_REGISTER_OPERATIONS and CANNOT_CHANGE_MODE_CLASS(from,
> to, class) and set it to true if GET_MODE_SIZE (from) < GET_MODE_SIZE (to)
> but it didn't help.
> Any suggestions for a generic solution?
What kind of generic solution? Eliminating paradoxical subregs altogether?
That's very likely not doable if you define WORD_REGISTER_OPERATIONS anyway.
You need to pinpoint where things start to go wrong, for example in combine.