[PATCH] D20626: [Clang][AVX512][intrinsics] Adding missing intrinsics div_pd and div_ps
Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 14 05:45:46 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL272658: [Clang][AVX512][intrinsics] Adding missing intrinsics div_pd and div_ps (authored by mzuckerm).
Changed prior to commit:
http://reviews.llvm.org/D20626?vs=59663&id=60668#toc
Repository:
rL LLVM
http://reviews.llvm.org/D20626
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
@@ -1972,10 +1972,15 @@
// CHECK: @llvm.x86.avx512.mask.div.pd.512
return _mm512_maskz_div_round_pd(__U,__A,__B,_MM_FROUND_TO_NEAREST_INT);
}
-__m512d test_mm512_mask_div_pd(__m512d __W, __mmask8 __U, __m512d __A, __m512d __B) {
- // CHECK-LABEL: @test_mm512_mask_div_pd
+__m512d test_mm512_div_pd(__m512d __a, __m512d __b) {
+ // CHECK-LABLE: @test_mm512_div_pd
+ // CHECK: fdiv <8 x double>
+ return _mm512_div_pd(__a,__b);
+}
+__m512d test_mm512_mask_div_pd(__m512d __w, __mmask8 __u, __m512d __a, __m512d __b) {
+ // CHECK-LABLE: @test_mm512_mask_div_pd
// CHECK: @llvm.x86.avx512.mask.div.pd.512
- return _mm512_mask_div_pd(__W,__U,__A,__B);
+ return _mm512_mask_div_pd(__w,__u,__a,__b);
}
__m512d test_mm512_maskz_div_pd(__mmask8 __U, __m512d __A, __m512d __B) {
// CHECK-LABEL: @test_mm512_maskz_div_pd
@@ -1997,6 +2002,11 @@
// CHECK: @llvm.x86.avx512.mask.div.ps.512
return _mm512_maskz_div_round_ps(__U,__A,__B,_MM_FROUND_TO_NEAREST_INT);
}
+__m512 test_mm512_div_ps(__m512 __A, __m512 __B) {
+ // CHECK-LABEL: @test_mm512_div_ps
+ // CHECK: fdiv <16 x float>
+ return _mm512_div_ps(__A,__B);
+}
__m512 test_mm512_mask_div_ps(__m512 __W, __mmask16 __U, __m512 __A, __m512 __B) {
// CHECK-LABEL: @test_mm512_mask_div_ps
// CHECK: @llvm.x86.avx512.mask.div.ps.512
Index: cfe/trunk/lib/Headers/avx512fintrin.h
===================================================================
--- cfe/trunk/lib/Headers/avx512fintrin.h
+++ cfe/trunk/lib/Headers/avx512fintrin.h
@@ -2446,6 +2446,12 @@
(__v2df)_mm_setzero_pd(), \
(__mmask8)(U), (int)(R)); })
+static __inline __m512d __DEFAULT_FN_ATTRS
+_mm512_div_pd(__m512d __a, __m512d __b)
+{
+ return (__m512d)((__v8df)__a/(__v8df)__b);
+}
+
static __inline__ __m512d __DEFAULT_FN_ATTRS
_mm512_mask_div_pd(__m512d __W, __mmask8 __U, __m512d __A, __m512d __B) {
return (__m512d) __builtin_ia32_divpd512_mask ((__v8df) __A,
@@ -2465,6 +2471,12 @@
_MM_FROUND_CUR_DIRECTION);
}
+static __inline __m512 __DEFAULT_FN_ATTRS
+_mm512_div_ps(__m512 __a, __m512 __b)
+{
+ return (__m512)((__v16sf)__a/(__v16sf)__b);
+}
+
static __inline__ __m512 __DEFAULT_FN_ATTRS
_mm512_mask_div_ps(__m512 __W, __mmask16 __U, __m512 __A, __m512 __B) {
return (__m512) __builtin_ia32_divps512_mask ((__v16sf) __A,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20626.60668.patch
Type: text/x-patch
Size: 2605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160614/97cdb06f/attachment.bin>
More information about the cfe-commits
mailing list