Hi All,
I was in the process of implementing a gathering load for my language.
I got the getelementptr vector form working. However there doesn't seem
to be a way to load a vector of values using the vector of pointers from
getelementptr. Am I correct that this is not possible with LLVM IR
currently (apart from with the avx2 gather intrinsic)?
And if so, are there plans to allow loading of a vector of values?
I think extending the load instruction to take a vector of pointers (as
would be produced by getelementptr) would work well.
Thanks,
Nick C.
On Jan 14, 2014, at 11:11 AM, Nicholas Chapman <admin at indigorenderer.com> wrote:> Hi All, > I was in the process of implementing a gathering load for my language. I got the getelementptr vector form working. However there doesn't seem to be a way to load a vector of values using the vector of pointers from getelementptr. Am I correct that this is not possible with LLVM IR currently (apart from with the avx2 gather intrinsic)?I believe you are correct. This is not currently possible.> > And if so, are there plans to allow loading of a vector of values? > > I think extending the load instruction to take a vector of pointers (as would be produced by getelementptr) would work well.This is of interests to a lot of people and I think it's a reasonable time to start the discussion. Do you have any concrete proposal in mind? Evan> > Thanks, > Nick C. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Hi Evan, all,
The most obvious thing to me would be to extend the load instruction to
have an additional form that takes a vector of pointers instead of a
single pointer.
This form would return a vector of values instead of a single value.
If a gather instruction is not available on the target, then the load
could be lowered to a series of scalar loads and insertelements.
Thanks,
Nick
On 20/01/2014 5:59 p.m., Evan Cheng wrote:> On Jan 14, 2014, at 11:11 AM, Nicholas Chapman <admin at
indigorenderer.com> wrote:
>
>> Hi All,
>> I was in the process of implementing a gathering load for my language.
I got the getelementptr vector form working. However there doesn't seem to
be a way to load a vector of values using the vector of pointers from
getelementptr. Am I correct that this is not possible with LLVM IR currently
(apart from with the avx2 gather intrinsic)?
> I believe you are correct. This is not currently possible.
>
>> And if so, are there plans to allow loading of a vector of values?
>>
>> I think extending the load instruction to take a vector of pointers (as
would be produced by getelementptr) would work well.
> This is of interests to a lot of people and I think it's a reasonable
time to start the discussion. Do you have any concrete proposal in mind?
>
> Evan
>
>> Thanks,
>> Nick C.
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Maybe Matching Threads
- [LLVMdev] Gather load in LLVM IR
- [LLVMdev] Optimisation pass to move an alloca'd array to a global constant array
- [LLVMdev] Windows x64 support
- [LLVMdev] A limitation of LLVM with regard to marking sret functions as readonly.
- [LLVMdev] Autovectorization questions