[LLVMdev] Converting a i32 pointer to a vector of i32 ( C array to LLVM vector)

James Courtier-Dutton james.dutton at gmail.com
Thu Oct 17 01:53:49 PDT 2013


If what you are saying is that you know the array of i32 will always be 10
entries, make the function use a constant limit=10 to the loop.
I.e Make the loop limit a constant and not a variable.



On 11 October 2013 18:27, Matthieu Dubet <maattdd at gmail.com> wrote:

> Hi,
>
> I'm creating a small function in LLVM which gets as a parameter an i32*
> (this function is called from C code) .
>
> However I know that this pointer is actually a C array of size 10 (
> int[10] ).
>
> How can I tell LLVM to consider this i32* as an <10 x i32> (and thus get
> the performance improvements thanks to SIMD ..etc..) ?
>
> Thanks,
> Matthieu
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131017/6ce2f480/attachment.html>


More information about the llvm-dev mailing list