SIMD intrinsics

David Nadlinger via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Mon Feb 9 02:00:06 PST 2015


On Monday, 9 February 2015 at 09:43:26 UTC, Ola Fosheim Grøstad 
wrote:
> ldc.gccbuiltins_x86.di does not contain:
>
> __m256 _mm256_add_ps (__m256 a, __m256 b)
> #include "immintrin.h"
> Instruction: vaddps ymm, ymm, ymm
> CPUID Flags: AVX
>
> But it does contain less important instructions such a 256bit 
> "addsub".
>
> I am trying to build up a set of standard Intel intrinsics, but 
> not sure how to work around this (or did I miss something?)

Unfortunately, LLVM only offers intrinsics for operations that 
are not expressible in standard LLVM IR.

Just using the addition operator on the appropriate vector types 
with AVX enabled might already yield the result you are looking 
for. Otherwise, you can use inline IR (see e.g. ldc.simd).

David


More information about the digitalmars-d-ldc mailing list