forked from OSchip/llvm-project
[Clang][AVX512][BuiltIn] Adding intrinsics for cvtps2pd instruction set
Differential Revision: http://reviews.llvm.org/D19774 llvm-svn: 268217
This commit is contained in:
parent
f0344826b9
commit
d6e68ce75f
|
@ -2241,6 +2241,7 @@ TARGET_BUILTIN(__builtin_ia32_expandloadsf512_mask, "V16fvC*V16fUs","","avx512f"
|
|||
TARGET_BUILTIN(__builtin_ia32_expandloadsi512_mask, "V16ivC*V16iUs","","avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_expandsf512_mask, "V16fV16fV16fUs","","avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_expandsi512_mask, "V16iV16iV16iUs","","avx512f")
|
||||
TARGET_BUILTIN(__builtin_ia32_cvtps2pd512_mask, "V8dV8fV8dUcIi","","avx512f")
|
||||
|
||||
#undef BUILTIN
|
||||
#undef TARGET_BUILTIN
|
||||
|
|
|
@ -7882,6 +7882,55 @@ _mm512_maskz_expand_epi32 (__mmask16 __U, __m512i __A)
|
|||
(__mmask16) __U);
|
||||
}
|
||||
|
||||
#define _mm512_cvt_roundps_pd( __A, __R) __extension__ ({ \
|
||||
__builtin_ia32_cvtps2pd512_mask ((__v8sf)( __A),\
|
||||
(__v8df)\
|
||||
_mm512_undefined_pd (),\
|
||||
(__mmask8) -1,( __R));\
|
||||
})
|
||||
|
||||
#define _mm512_mask_cvt_roundps_pd( __W, __U, __A, __R) __extension__ ({ \
|
||||
__builtin_ia32_cvtps2pd512_mask ((__v8sf)( __A),\
|
||||
(__v8df)( __W),\
|
||||
(__mmask8)( __U),( __R));\
|
||||
})
|
||||
|
||||
#define _mm512_maskz_cvt_roundps_pd( __U, __A, __R) __extension__ ({ \
|
||||
__builtin_ia32_cvtps2pd512_mask ((__v8sf)( __A),\
|
||||
(__v8df)\
|
||||
_mm512_setzero_pd (),\
|
||||
(__mmask8)( __U),( __R));\
|
||||
})
|
||||
|
||||
static __inline__ __m512d __DEFAULT_FN_ATTRS
|
||||
_mm512_cvtps_pd (__m256 __A)
|
||||
{
|
||||
return (__m512d) __builtin_ia32_cvtps2pd512_mask ((__v8sf) __A,
|
||||
(__v8df)
|
||||
_mm512_undefined_pd (),
|
||||
(__mmask8) -1,
|
||||
_MM_FROUND_CUR_DIRECTION);
|
||||
}
|
||||
|
||||
static __inline__ __m512d __DEFAULT_FN_ATTRS
|
||||
_mm512_mask_cvtps_pd (__m512d __W, __mmask8 __U, __m256 __A)
|
||||
{
|
||||
return (__m512d) __builtin_ia32_cvtps2pd512_mask ((__v8sf) __A,
|
||||
(__v8df) __W,
|
||||
(__mmask8) __U,
|
||||
_MM_FROUND_CUR_DIRECTION);
|
||||
}
|
||||
|
||||
static __inline__ __m512d __DEFAULT_FN_ATTRS
|
||||
_mm512_maskz_cvtps_pd (__mmask8 __U, __m256 __A)
|
||||
{
|
||||
return (__m512d) __builtin_ia32_cvtps2pd512_mask ((__v8sf) __A,
|
||||
(__v8df)
|
||||
_mm512_setzero_pd (),
|
||||
(__mmask8) __U,
|
||||
_MM_FROUND_CUR_DIRECTION);
|
||||
}
|
||||
|
||||
#undef __DEFAULT_FN_ATTRS
|
||||
|
||||
#endif // __AVX512FINTRIN_H
|
||||
|
|
|
@ -5470,3 +5470,38 @@ __m512i test_mm512_maskz_expand_epi32(__mmask16 __U, __m512i __A) {
|
|||
// CHECK: @llvm.x86.avx512.mask.expand.d.512
|
||||
return _mm512_maskz_expand_epi32(__U, __A);
|
||||
}
|
||||
__m512d test_mm512_cvt_roundps_pd(__m256 __A) {
|
||||
// CHECK-LABEL: @test_mm512_cvt_roundps_pd
|
||||
// CHECK: @llvm.x86.avx512.mask.cvtps2pd.512
|
||||
return _mm512_cvt_roundps_pd(__A, _MM_FROUND_CUR_DIRECTION);
|
||||
}
|
||||
|
||||
__m512d test_mm512_mask_cvt_roundps_pd(__m512d __W, __mmask8 __U, __m256 __A) {
|
||||
// CHECK-LABEL: @test_mm512_mask_cvt_roundps_pd
|
||||
// CHECK: @llvm.x86.avx512.mask.cvtps2pd.512
|
||||
return _mm512_mask_cvt_roundps_pd(__W, __U, __A, _MM_FROUND_CUR_DIRECTION);
|
||||
}
|
||||
|
||||
__m512d test_mm512_maskz_cvt_roundps_pd(__mmask8 __U, __m256 __A) {
|
||||
// CHECK-LABEL: @test_mm512_maskz_cvt_roundps_pd
|
||||
// CHECK: @llvm.x86.avx512.mask.cvtps2pd.512
|
||||
return _mm512_maskz_cvt_roundps_pd(__U, __A, _MM_FROUND_CUR_DIRECTION);
|
||||
}
|
||||
|
||||
__m512d test_mm512_cvtps_pd(__m256 __A) {
|
||||
// CHECK-LABEL: @test_mm512_cvtps_pd
|
||||
// CHECK: @llvm.x86.avx512.mask.cvtps2pd.512
|
||||
return _mm512_cvtps_pd(__A);
|
||||
}
|
||||
|
||||
__m512d test_mm512_mask_cvtps_pd(__m512d __W, __mmask8 __U, __m256 __A) {
|
||||
// CHECK-LABEL: @test_mm512_mask_cvtps_pd
|
||||
// CHECK: @llvm.x86.avx512.mask.cvtps2pd.512
|
||||
return _mm512_mask_cvtps_pd(__W, __U, __A);
|
||||
}
|
||||
|
||||
__m512d test_mm512_maskz_cvtps_pd(__mmask8 __U, __m256 __A) {
|
||||
// CHECK-LABEL: @test_mm512_maskz_cvtps_pd
|
||||
// CHECK: @llvm.x86.avx512.mask.cvtps2pd.512
|
||||
return _mm512_maskz_cvtps_pd(__U, __A);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue