[PATCH] D66785: [x86] Adding support for some missing intrinsics: _mm512_cvtsi512_si32
Bing Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 23:25:43 PDT 2019
yubing created this revision.
yubing added reviewers: craig.topper, pengfei, LuoYuanke.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Adding support for some missing intrinsics:
_mm512_cvtsi512_si32
Repository:
rL LLVM
https://reviews.llvm.org/D66785
Files:
clang/lib/Headers/avx512fintrin.h
clang/test/CodeGen/avx512f-builtins.c
Index: clang/test/CodeGen/avx512f-builtins.c
===================================================================
--- clang/test/CodeGen/avx512f-builtins.c
+++ clang/test/CodeGen/avx512f-builtins.c
@@ -10845,3 +10845,9 @@
// CHECK: shufflevector <4 x i64> %{{.*}}, <4 x i64> %{{.*}}, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
return _mm512_zextsi256_si512(A);
}
+
+int test_mm512_cvtsi512_si32(__m512i a) {
+ // CHECK-LABEL: test_mm512_cvtsi512_si32
+ // CHECK: %{{.*}} = extractelement <16 x i32> %{{.*}}, i32 0
+ return _mm512_cvtsi512_si32(a);
+}
Index: clang/lib/Headers/avx512fintrin.h
===================================================================
--- clang/lib/Headers/avx512fintrin.h
+++ clang/lib/Headers/avx512fintrin.h
@@ -9659,6 +9659,12 @@
}
#undef _mm512_mask_reduce_operator
+static __inline__ int __DEFAULT_FN_ATTRS512
+_mm512_cvtsi512_si32(__m512i __A) {
+ __v16si __b = (__v16si)__A;
+ return __b[0];
+}
+
#undef __DEFAULT_FN_ATTRS512
#undef __DEFAULT_FN_ATTRS128
#undef __DEFAULT_FN_ATTRS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66785.217314.patch
Type: text/x-patch
Size: 1056 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190827/364a9fe1/attachment.bin>
More information about the llvm-commits
mailing list