[PATCH] D31155: [X86][AVX512] Add _mm512_cvtsd_f64 and _mm512_cvtss_f32 intrinsics (PR32305)
Simon Pilgrim via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 21 05:58:30 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL298364: [X86][AVX512] Add _mm512_cvtsd_f64 and _mm512_cvtss_f32 intrinsics (PR32305) (authored by RKSimon).
Changed prior to commit:
https://reviews.llvm.org/D31155?vs=92390&id=92477#toc
Repository:
rL LLVM
https://reviews.llvm.org/D31155
Files:
cfe/trunk/lib/Headers/avx512fintrin.h
cfe/trunk/test/CodeGen/avx512f-builtins.c
Index: cfe/trunk/test/CodeGen/avx512f-builtins.c
===================================================================
--- cfe/trunk/test/CodeGen/avx512f-builtins.c
+++ cfe/trunk/test/CodeGen/avx512f-builtins.c
@@ -7259,6 +7259,18 @@
return _mm512_maskz_cvtps_epu32( __U, __A);
}
+double test_mm512_cvtsd_f64(__m512d A) {
+ // CHECK-LABEL: test_mm512_cvtsd_f64
+ // CHECK: extractelement <8 x double> %{{.*}}, i32 0
+ return _mm512_cvtsd_f64(A);
+}
+
+float test_mm512_cvtss_f32(__m512 A) {
+ // CHECK-LABEL: test_mm512_cvtss_f32
+ // CHECK: extractelement <16 x float> %{{.*}}, i32 0
+ return _mm512_cvtss_f32(A);
+}
+
__m512d test_mm512_mask_max_pd (__m512d __W, __mmask8 __U, __m512d __A, __m512d __B)
{
// CHECK-LABEL: @test_mm512_mask_max_pd
Index: cfe/trunk/lib/Headers/avx512fintrin.h
===================================================================
--- cfe/trunk/lib/Headers/avx512fintrin.h
+++ cfe/trunk/lib/Headers/avx512fintrin.h
@@ -4229,6 +4229,18 @@
_MM_FROUND_CUR_DIRECTION);
}
+static __inline__ double __DEFAULT_FN_ATTRS
+_mm512_cvtsd_f64(__m512d __a)
+{
+ return __a[0];
+}
+
+static __inline__ float __DEFAULT_FN_ATTRS
+_mm512_cvtss_f32(__m512 __a)
+{
+ return __a[0];
+}
+
/* Unpack and Interleave */
static __inline __m512d __DEFAULT_FN_ATTRS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31155.92477.patch
Type: text/x-patch
Size: 1311 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170321/dbf683a1/attachment.bin>
More information about the cfe-commits
mailing list