From 8935beba49687044fe6f7ad510360e0ab1e6183f Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Mon, 28 Jul 2014 17:14:45 +0000 Subject: [PATCH] [AVX512] Add non-masking FP store intrinsics Part of git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214099 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Headers/avx512fintrin.h | 24 ++++++++++++++++++++++++ test/CodeGen/avx512f-builtins.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/lib/Headers/avx512fintrin.h b/lib/Headers/avx512fintrin.h index 785d5281bc..cebb0d5a05 100644 --- a/lib/Headers/avx512fintrin.h +++ b/lib/Headers/avx512fintrin.h @@ -760,6 +760,12 @@ _mm512_mask_storeu_pd(void *__P, __mmask8 __U, __m512d __A) __builtin_ia32_storeupd512_mask ((__v8df *)__P, (__v8df) __A, (__mmask8) __U); } +static __inline void __attribute__ ((__always_inline__, __nodebug__)) +_mm512_storeu_pd(void *__P, __m512d __A) +{ + __builtin_ia32_storeupd512_mask((__v8df *)__P, (__v8df)__A, (__mmask8)-1); +} + static __inline void __attribute__ ((__always_inline__, __nodebug__)) _mm512_mask_storeu_ps(void *__P, __mmask16 __U, __m512 __A) { @@ -767,4 +773,22 @@ _mm512_mask_storeu_ps(void *__P, __mmask16 __U, __m512 __A) (__mmask16) __U); } +static __inline void __attribute__ ((__always_inline__, __nodebug__)) +_mm512_storeu_ps(void *__P, __m512 __A) +{ + __builtin_ia32_storeups512_mask((__v16sf *)__P, (__v16sf)__A, (__mmask16)-1); +} + +static __inline void __attribute__ ((__always_inline__, __nodebug__)) +_mm512_store_ps(void *__P, __m512 __A) +{ + *(__m512*)__P = __A; +} + +static __inline void __attribute__ ((__always_inline__, __nodebug__)) +_mm512_store_pd(void *__P, __m512d __A) +{ + *(__m512d*)__P = __A; +} + #endif // __AVX512FINTRIN_H diff --git a/test/CodeGen/avx512f-builtins.c b/test/CodeGen/avx512f-builtins.c index 968c015c87..ea84583734 100644 --- a/test/CodeGen/avx512f-builtins.c +++ b/test/CodeGen/avx512f-builtins.c @@ -60,3 +60,31 @@ __m512d test_mm512_mul_pd(__m512d a, __m512d b) // CHECK: fmul <8 x double> return _mm512_mul_pd(a, b); } + +void test_mm512_storeu_ps(void *p, __m512 a) +{ + // CHECK-LABEL: @test_mm512_storeu_ps + // CHECK: @llvm.x86.avx512.mask.storeu.ps.512 + _mm512_storeu_ps(p, a); +} + +void test_mm512_storeu_pd(void *p, __m512d a) +{ + // CHECK-LABEL: @test_mm512_storeu_pd + // CHECK: @llvm.x86.avx512.mask.storeu.pd.512 + _mm512_storeu_pd(p, a); +} + +void test_mm512_store_ps(void *p, __m512 a) +{ + // CHECK-LABEL: @test_mm512_store_ps + // CHECK: store <16 x float> + _mm512_store_ps(p, a); +} + +void test_mm512_store_pd(void *p, __m512d a) +{ + // CHECK-LABEL: @test_mm512_store_pd + // CHECK: store <8 x double> + _mm512_store_pd(p, a); +} -- 2.40.0