r271205 - [Clang][avx512][builtin] Adding missing intrinsics for cvt
Michael Zuckerman via cfe-commits
cfe-commits at lists.llvm.org
Mon May 30 06:22:14 PDT 2016
Author: mzuckerm
Date: Mon May 30 08:22:12 2016
New Revision: 271205
URL: http://llvm.org/viewvc/llvm-project?rev=271205&view=rev
Log:
[Clang][avx512][builtin] Adding missing intrinsics for cvt
Differential Revision: http://reviews.llvm.org/D20618
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=271205&r1=271204&r2=271205&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512fintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512fintrin.h Mon May 30 08:22:12 2016
@@ -3792,6 +3792,16 @@ _mm512_mask_cvtps_epu32 (__m512i __W, __
_MM_FROUND_CUR_DIRECTION);
}
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_maskz_cvtps_epu32 ( __mmask16 __U, __m512 __A)
+{
+ return (__m512i) __builtin_ia32_cvtps2udq512_mask ((__v16sf) __A,
+ (__v16si)
+ _mm512_setzero_si512 (),
+ (__mmask16) __U ,
+ _MM_FROUND_CUR_DIRECTION);
+}
+
#define _mm512_cvt_roundpd_epu32(A, R) __extension__ ({ \
(__m256i)__builtin_ia32_cvtpd2udq512_mask((__v8df)(__m512d)(A), \
(__v8si)_mm256_setzero_si256(), \
Modified: cfe/trunk/test/CodeGen/avx512f-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512f-builtins.c?rev=271205&r1=271204&r2=271205&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512f-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512f-builtins.c Mon May 30 08:22:12 2016
@@ -6411,6 +6411,12 @@ __m512i test_mm512_mask_cvtps_epu32 (__m
// CHECK: @llvm.x86.avx512.mask.cvtps2udq.512
return _mm512_mask_cvtps_epu32( __W, __U, __A);
}
+__m512i test_mm512_maskz_cvtps_epu32 (__mmask16 __U, __m512 __A)
+{
+ // CHECK-LABEL: @test_mm512_maskz_cvtps_epu32
+ // CHECK: @llvm.x86.avx512.mask.cvtps2udq.512
+ return _mm512_maskz_cvtps_epu32( __U, __A);
+}
__m512d test_mm512_mask_max_pd (__m512d __W, __mmask8 __U, __m512d __A, __m512d __B)
{
More information about the cfe-commits
mailing list