r214380 - [AVX512] Add unaligned FP load intrinsics
Adam Nemet
anemet at apple.com
Wed Jul 30 21:00:40 PDT 2014
Author: anemet
Date: Wed Jul 30 23:00:39 2014
New Revision: 214380
URL: http://llvm.org/viewvc/llvm-project?rev=214380&view=rev
Log:
[AVX512] Add unaligned FP load intrinsics
Part of <rdar://problem/17688758>
Modified:
cfe/trunk/lib/Headers/avx512fintrin.h
cfe/trunk/test/CodeGen/avx512f-builtins.c
Modified: cfe/trunk/lib/Headers/avx512fintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512fintrin.h?rev=214380&r1=214379&r2=214380&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512fintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512fintrin.h Wed Jul 30 23:00:39 2014
@@ -791,6 +791,24 @@ _mm512_maskz_loadu_pd(__mmask8 __U, void
(__mmask8) __U);
}
+static __inline __m512d __attribute__((__always_inline__, __nodebug__))
+_mm512_loadu_pd(double const *__p)
+{
+ struct __loadu_pd {
+ __m512d __v;
+ } __attribute__((packed, may_alias));
+ return ((struct __loadu_pd*)__p)->__v;
+}
+
+static __inline __m512 __attribute__((__always_inline__, __nodebug__))
+_mm512_loadu_ps(float const *__p)
+{
+ struct __loadu_ps {
+ __m512 __v;
+ } __attribute__((packed, may_alias));
+ return ((struct __loadu_ps*)__p)->__v;
+}
+
/* SIMD store ops */
static __inline void __attribute__ ((__always_inline__, __nodebug__))
Modified: cfe/trunk/test/CodeGen/avx512f-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512f-builtins.c?rev=214380&r1=214379&r2=214380&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512f-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512f-builtins.c Wed Jul 30 23:00:39 2014
@@ -89,6 +89,20 @@ void test_mm512_store_pd(void *p, __m512
_mm512_store_pd(p, a);
}
+__m512 test_mm512_loadu_ps(void *p)
+{
+ // CHECK-LABEL: @test_mm512_loadu_ps
+ // CHECK: load <16 x float>* {{.*}}, align 1{{$}}
+ return _mm512_loadu_ps(p);
+}
+
+__m512d test_mm512_loadu_pd(void *p)
+{
+ // CHECK-LABEL: @test_mm512_loadu_pd
+ // CHECK: load <8 x double>* {{.*}}, align 1{{$}}
+ return _mm512_loadu_pd(p);
+}
+
__m512d test_mm512_set1_pd(double d)
{
// CHECK-LABEL: @test_mm512_set1_pd
More information about the cfe-commits
mailing list