[LLVMdev] How to do bitcast for double to <2 x double>

mats petersson mats at planetcatfish.com
Wed Apr 15 13:03:02 PDT 2015


Create a type that is a "vector (array) of 2 double", and then a
pointer to that. Now use bitcast your on double pointer to that
pointer type you've created, and then create a load...

If you need more help, it would help if you post the code you are working on...

--
Mats

On 15 April 2015 at 19:51, zhi chen <zchenhn at gmail.com> wrote:
> How can I write code to generate IR for:
> %2 = bitcast double* %1 to <2 x double>*.
> %3 = load <2 x double>* %2, align 16
> Basically, it is similar to x86 _mm_load_pd1 intrinsics.
>
> Thanks,
> Zhi
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



More information about the llvm-dev mailing list