https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116390

--- Comment #7 from Jeffrey A. Law <law at gcc dot gnu.org> ---
WRT the question in c#1.  A paradoxical subreg is the canonical way to say I
want to view this pseudo (or expression) in a mode wider than its native mode
and I don't care about the state of the bits outside its native mode.

So when ext-dce finds an extension where the upper bits are not used, it'll
convert it into a paradoxical subreg.  That's per design and from what I can
see it's behaving correctly.

It has always been advantageous if (when safe) patterns that accept zero/sign
extension could also accept a paradoxical subreg.  With ext-dce it just make it
even more useful to handle those cases.  You certainly don't have to convert
everything, but it is useful to review the patterns and see if they can be
safely used with a paradoxical subreg and extend those that look profitable to
do so.

As far as the register allocator issue.  I would suggest you look deeper into
that since it could be either a register allocator bug or a bug in the backend.
 I suggest first looking at the state after IRA to see if it is sensible.   If
avr is still a reload target, note that we have a known bug with how reload
handles paradoxical subregs that we're still working on.

Reply via email to