This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 34998: Tracking of subreg liveness in global.c and ra-conflict.c
David Edelsohn <dje@watson.ibm.com> writes:
> >>>>> Richard Sandiford writes:
>
> > So I think the patch really does model the intended behaviour of the
> > pseudo-register access in this case. E.g. if we allocate an SImode
> > pseudo FOO to two HImode registers on a 32-bit target, a set of
> > (subreg:HI (reg:SI FOO) ...) really should clobber both of the HImode
> > registers. ("..." is either 0 or 2, depending on endianness. The other
> > value isn't valid.)
>
> The analysis and patch seem to contradict changes made to the
> PowerPC port in 2000:
>
> http://gcc.gnu.org/ml/gcc-patches/2000-01/msg00899.html
> http://gcc.gnu.org/ml/gcc-patches/2000-01/msg00921.html
>
> A pattern implemented
>
> (set (subreg:SI (reg:DI foo)) (reg:SI bar))
>
> and the lifetime analysis of the period decided the pseudo was live since
> the beginning. Geoff Keating and RTH agreed that the SUBREG should be
> changed to an UNSPEC specifically to express that the pattern killed the
> entire pseudo. Maybe the semantics have changed / been clarified in the
> intervening time.
Richard is talking about HImode => SImode. You are talking about
SImode => DImode, for a 32-bit target. These are different cases,
because multi-word subregs operate one word at a time. Richard's
patch effectively expands the set of the HImode subreg to clobber the
whole SImode. His patch would not do anything for a set of an SImode
subreg on a 32-bit target.
Ian