This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: generic vectors and GPR/simd duality


Hi,

On Wed, 12 May 2004, Aldy Hernandez wrote:

> We start with:
> 
>     (insn 14 13 15 (set (subreg:V2SI (reg:V4SI 123) 0)
>             (neg:V2SI (reg:V2SI 124))) -1 (nil)
>         (nil))
> 
> The register allocator gives GPR #26-#30 for the V4SI mode above:
> 
>      (insn 14 13 17 0 (set (subreg:V2SI (reg:V4SI 26 26 [123]) 0)
>              (neg:V2SI (reg:V2SI 0 0 [124])))
> 
> mode_multiple from V2SI to V4SI is 2, whereas nregs_multiple is 4.
> GPR #26 can hold a V2SI in just one register, but needs 4 for a V4SI.

Hell.  I believe this property should make the forming of the subreg 
invalid, exactly because this makes it not something like a subword 
extraction.  But subregs which aren't subword extractions are only handled 
correctly when one mode only needs one register (like for instance a
SI --> HI conversion on 32bit register machines) and it is the low part 
(which the above isn't because this is big endian, right?).


Ciao,
Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]