[LLVMdev] Haswell New Instructions
David A. Greene
greened at obbligato.org
Wed Jun 15 14:40:47 PDT 2011
greened at obbligato.org (David A. Greene) writes:
> Jose Fonseca <jfonseca at vmware.com> writes:
>
>> The important thing IMO, is to not represent the gather operation as
>> an instruction which takes a vector of pointers, because that's too
>> restrictive for architectures with 64bits pointers.
>
> How is it restrictive?
Ah, I think you mean you don't want it ONLY to allow a vector of
pointers. I absolutely agree with this view.
>> What one most frequently wants to do in those architectures is to specify a
>> 64bit scalar base pointer with a vector of 32bit offsets.
>
> Or 64-bit offsets. We should not restrict offsets to 32 bits.
To reiterate, a base address + vector of indices gets my vote. If the
base happens to be zero and the indices happen to be pre-scaled pointer
values, so be it. :)
The raises the question of whether indices get scaled by the vector
element type size. This would compilcate the semantics of load, I
think, because getelementptr is really the instruction that does the
scaling. If we have a gather operation (wether a load with vector of
indices or a special instruction) it seems that we will need some kind
of vector getelementptr as well.
-Dave
More information about the llvm-dev
mailing list