This is the mail archive of the
mailing list for the GCC project.
Re: Vector subregs
- From: Daniel Berlin <dan at cgsoftware dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Fri, 14 Dec 2001 14:19:24 -0500
- Subject: Re: Vector subregs
On Friday, December 14, 2001, at 01:59 PM, Alexandre Oliva wrote:
> On Dec 14, 2001, Dale Johannesen <firstname.lastname@example.org> wrote:
>> Subreg's of vectors don't have a register implementation on any
>> hardware AFAIK, so there is no reason to support them.
> Hmm... The SH4 can use 4 FP registers as a V4SF unit for some
> operations, as well as 4 of these sets as a 4x4 SF matrix. I suppose
> it would be reasonable to be able to use subregs to refer to
> individual registers that compose such vectors and matrices, wouldn't
Vectors maybe, matrices, no.
I'd rather see a vec_slice rtl or something.
Yes, I know you probably *could* use subregs for vectors.
But remember that one of the most annoying things right now about RTL
that we don't represent subscripting of arrays, etc. It's way too low
Why should we do the same thing to vectors and matrices, by using
subregs , when we have a chance to do it right at the start, and just
say what we mean (which is a slice of a vector/matrix)?
Also think of trying to allocate vector subregs in a reasonable way, or
matrix subregs in a reasonable way.
We have vec_merge, vec_sel, etc. Just add a vec_slice.