This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [rfc] multi-word subreg lowering pass
- From: Paul Schlie <schlie at comcast dot net>
- To: Richard Henderson <rth at redhat dot com>,Björn Haase <bjoern dot m dot haase at web dot de>,<gcc-patches at gcc dot gnu dot org>
- Date: Sat, 07 May 2005 10:56:43 -0400
- Subject: Re: [rfc] multi-word subreg lowering pass
> From: Paul Schlie <schlie@comcast.net>
>> Richard Henderson writes:
>> ...
>> Where it fails is when the target has patterns that take multi-word
>> inputs. In this case we have to stop and leave the data in the
>> multi-word pseudo. This approach does have the advantage of being
>> able to work incrementally, though it's also true that incomplete
>> conversion can hurt
>
> - Out of curiosity, why not leave all decomposed operations in their
> subreg form, thereby maintaining the logical integrity of their operand
> modes? i.e. the above decomposes to something like:
>
> (set (subreg:SI 100 0) (and:SI (reg:SI x) (subreg:SI y 0)))
> (set (subreg:SI 100 1) (and:SI (const_int 0) (subreg:SI y 1)))
>
> which seems both simpler, and does not require introduction of new
> semantics which complicate multi-word/sub-reg input operand expressions.
- where then I'd guess:
char foo (char x, long long y)
{
return x & y;
}
could be then be correspondingly "lowered" to something like:
(set (reg:QI 100) (and:QI (reg:QI x) (subreg:QI y 0))
whereby then it should be sufficiently clear that (subreg:QI y 0)
would only require the "loading" of the QI subreg component of "y"
if no subreg components are referenced?