[PATCH] D17991: [CLANG][AVX512][BUILTIN] storeup{d|s}{128|256}
michael zuckerman via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 9 06:30:16 PST 2016
m_zuckerman created this revision.
m_zuckerman added reviewers: delena, AsafBadouh, igorb.
m_zuckerman added a subscriber: llvm-commits.
http://reviews.llvm.org/D17991
Files:
include/clang/Basic/BuiltinsX86.def
lib/Headers/avx512vlintrin.h
test/CodeGen/avx512vl-builtins.c
Index: lib/Headers/avx512vlintrin.h
===================================================================
--- lib/Headers/avx512vlintrin.h
+++ lib/Headers/avx512vlintrin.h
@@ -6068,6 +6068,39 @@
_mm256_setzero_si256 (),
__M);
}
+
+static __inline__ void __DEFAULT_FN_ATTRS
+_mm_mask_storeu_pd (void *__P, __mmask8 __U, __m128d __A)
+{
+ __builtin_ia32_storeupd128_mask ((__v2df *) __P,
+ (__v2df) __A,
+ (__mmask8) __U);
+}
+
+static __inline__ void __DEFAULT_FN_ATTRS
+_mm256_mask_storeu_pd (void *__P, __mmask8 __U, __m256d __A)
+{
+ __builtin_ia32_storeupd256_mask ((__v4df *) __P,
+ (__v4df) __A,
+ (__mmask8) __U);
+}
+
+static __inline__ void __DEFAULT_FN_ATTRS
+_mm_mask_storeu_ps (void *__P, __mmask8 __U, __m128 __A)
+{
+ __builtin_ia32_storeups128_mask ((__v4sf *) __P,
+ (__v4sf) __A,
+ (__mmask8) __U);
+}
+
+static __inline__ void __DEFAULT_FN_ATTRS
+_mm256_mask_storeu_ps (void *__P, __mmask8 __U, __m256 __A)
+{
+ __builtin_ia32_storeups256_mask ((__v8sf *) __P,
+ (__v8sf) __A,
+ (__mmask8) __U);
+}
+
#undef __DEFAULT_FN_ATTRS
#undef __DEFAULT_FN_ATTRS_BOTH
Index: include/clang/Basic/BuiltinsX86.def
===================================================================
--- include/clang/Basic/BuiltinsX86.def
+++ include/clang/Basic/BuiltinsX86.def
@@ -1749,6 +1749,10 @@
TARGET_BUILTIN(__builtin_ia32_vpermt2varqi256_maskz, "V32cV32cV32cV32cUi","","avx512vbmi,avx512vl")
TARGET_BUILTIN(__builtin_ia32_vcomisd, "iV2dV2dIiIi","","avx512f")
TARGET_BUILTIN(__builtin_ia32_vcomiss, "iV4fV4fIiIi","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_storeupd128_mask, "vV2d*V2dUc","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_storeupd256_mask, "vV4d*V4dUc","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_storeups128_mask, "vV4f*V4fUc","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_storeups256_mask, "vV8f*V8fUc","","avx512f")
#undef BUILTIN
#undef TARGET_BUILTIN
Index: test/CodeGen/avx512vl-builtins.c
===================================================================
--- test/CodeGen/avx512vl-builtins.c
+++ test/CodeGen/avx512vl-builtins.c
@@ -4080,3 +4080,27 @@
return _mm256_maskz_set1_epi64(__M, __A);
}
+void test_mm_mask_storeu_pd(void *__P, __mmask8 __U, __m128d __A) {
+ // CHECK-LABEL: @test_mm_mask_storeu_pd
+ // CHECK: @llvm.x86.avx512.mask.storeu.pd.128
+ return _mm_mask_storeu_pd(__P, __U, __A);
+}
+
+void test_mm256_mask_storeu_pd(void *__P, __mmask8 __U, __m256d __A) {
+ // CHECK-LABEL: @test_mm256_mask_storeu_pd
+ // CHECK: @llvm.x86.avx512.mask.storeu.pd.256
+ return _mm256_mask_storeu_pd(__P, __U, __A);
+}
+
+void test_mm_mask_storeu_ps(void *__P, __mmask8 __U, __m128 __A) {
+ // CHECK-LABEL: @test_mm_mask_storeu_ps
+ // CHECK: @llvm.x86.avx512.mask.storeu.ps.128
+ return _mm_mask_storeu_ps(__P, __U, __A);
+}
+
+void test_mm256_mask_storeu_ps(void *__P, __mmask8 __U, __m256 __A) {
+ // CHECK-LABEL: @test_mm256_mask_storeu_ps
+ // CHECK: @llvm.x86.avx512.mask.storeu.ps.256
+ return _mm256_mask_storeu_ps(__P, __U, __A);
+}
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17991.50132.patch
Type: text/x-patch
Size: 3114 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160309/36ac2a21/attachment.bin>
More information about the llvm-commits
mailing list