RFC: subreg fixing (extract_bit_field or simplify_subreg)
Ulrich Weigand
weigand@i1.informatik.uni-erlangen.de
Mon Nov 1 19:18:00 GMT 2004
Richard Henderson wrote:
>On Fri, Oct 29, 2004 at 08:22:09PM -0400, Aldy Hernandez wrote:
>> extract_bit_field should be smart enough to do the above magic into a DI,
>> then copy it into the target (DF).
>
>Yes.
I guess I'm still confused about this question. Why would this make any
difference; as far as I can see nothing prevents combine to change this
right back into a (subreg:SI (reg:DF)), since simplify_subreg considers
this valid.
So what *is* the rule for subregs of pseudos?
(subreg:<M1> (reg:<M2> <pseudo>) <N>) is valid RTL if and only if
the tuple <M1>, <M2>, <N> has what property?
For hard registers, it is pretty clear that the intention seems to
be, the subreg is valid iff it is semantically equivalent to some
single hard reg. (There are apparently some exceptions to this rule
for frame-related hard regs that I don't quite understand.)
For pseudos, I had thought that the rule would be something like,
the subreg is valid iff there is some hard reg such that the
equivalent subreg using this hard reg instead of the pseudo is
valid. But if (subreg:SI (reg:DF)) is indeed categorically invalid,
this rule doesn't hold. So I'm confused now :-/
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de
More information about the Gcc
mailing list