This is the mail archive of the gcc@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: Avoiding paradoxical subregs


> 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.

-- 
Eric Botcazou


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