This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: subreg fixing (extract_bit_field or simplify_subreg)
- From: "Ulrich Weigand" <weigand at i1 dot informatik dot uni-erlangen dot de>
- To: rth at redhat dot com
- Cc: aldyh at redhat dot com, gcc at gcc dot gnu dot org, dje at watson dot ibm dot com
- Date: Mon, 1 Nov 2004 20:18:49 +0100 (CET)
- Subject: Re: RFC: subreg fixing (extract_bit_field or simplify_subreg)
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