r272658 - [Clang][AVX512][intrinsics] Adding missing intrinsics div_pd and div_ps
Michael Zuckerman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 14 05:38:58 PDT 2016
Author: mzuckerm
Date: Tue Jun 14 07:38:58 2016
New Revision: 272658
URL: http://llvm.org/viewvc/llvm-project?rev=272658&view=rev
Log:
[Clang][AVX512][intrinsics] Adding missing intrinsics div_pd and div_ps
Differential Revision: http://reviews.llvm.org/D20626
Modified:
cfe/trunk/lib/Headers/avx512fintrin.h
cfe/trunk/test/CodeGen/avx512f-builtins.c
Modified: cfe/trunk/lib/Headers/avx512fintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512fintrin.h?rev=272658&r1=272657&r2=272658&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512fintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512fintrin.h Tue Jun 14 07:38:58 2016
@@ -2446,6 +2446,12 @@ _mm_maskz_div_sd(__mmask8 __U,__m128d __
(__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 @@ _mm512_maskz_div_pd(__mmask8 __U, __m512
_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,
Modified: cfe/trunk/test/CodeGen/avx512f-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512f-builtins.c?rev=272658&r1=272657&r2=272658&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512f-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512f-builtins.c Tue Jun 14 07:38:58 2016
@@ -1972,10 +1972,15 @@ __m512d test_mm512_maskz_div_round_pd(__
// 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 @@ __m512 test_mm512_maskz_div_round_ps(__m
// 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
More information about the cfe-commits
mailing list