[cft] subreg validation patch

Ulrich Weigand Ulrich.Weigand@de.ibm.com
Mon Nov 15 22:02:00 GMT 2004





Richard Henderson <rth@redhat.com> wrote on 11/15/2004 09:03:19 PM:

> On Sun, Nov 14, 2004 at 04:03:39PM +0100, Ulrich Weigand wrote:
> > I've tried your patch on s390-ibm-linux and s390x-ibm-linux.  On both
> > platforms, bootstrap fails when building stage2, because of a bug in
> > regmove_optimize.  The code there tries to convert a paradoxical
> > subreg move into a move with the opposite subreg on the other side,
> > but completely messes up the subreg offset.  The following patch
> > appears to fix that problem:
>
> Indeed.  This should be ok to check in by itself.

Ah, maybe not: gen_lowpart probably isn't safe here as it may attempt
to generate new insns.  I think the appropriate thing to use here is
gen_lowpart_SUBREG.  OK with that change if testing passes?

> > I'm not sure how to fix that, not least because I still don't
understand
> > why this subreg is now supposed to be invalid in the first place ...
>
> According to the docs, it always was invalid.

Could you elaborate which docs?  I've been studying the 'subreg' section
in rtl.texi for quite a while, and been a bit frustrated by its attempt
to define things 'by example' instead of general statements ...

Thanks,
Ulrich



More information about the Gcc mailing list