Author: mzuckerm Date: Mon May 16 13:57:24 2016 New Revision: 269680 URL: http://llvm.org/viewvc/llvm-project?rev=269680&view=rev Log: [Clang][AVX512] completing missing intrinsics for [vpabs] instruction set
Differential Revision: http://reviews.llvm.org/D20069 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=269680&r1=269679&r2=269680&view=diff ============================================================================== --- cfe/trunk/lib/Headers/avx512fintrin.h (original) +++ cfe/trunk/lib/Headers/avx512fintrin.h Mon May 16 13:57:24 2016 @@ -1631,6 +1631,23 @@ _mm512_abs_epi64(__m512i __A) (__mmask8) -1); } +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_abs_epi64 (__m512i __W, __mmask8 __U, __m512i __A) +{ + return (__m512i) __builtin_ia32_pabsq512_mask ((__v8di) __A, + (__v8di) __W, + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_abs_epi64 (__mmask8 __U, __m512i __A) +{ + return (__m512i) __builtin_ia32_pabsq512_mask ((__v8di) __A, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) __U); +} + static __inline __m512i __DEFAULT_FN_ATTRS _mm512_abs_epi32(__m512i __A) { @@ -1640,6 +1657,23 @@ _mm512_abs_epi32(__m512i __A) (__mmask16) -1); } +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_abs_epi32 (__m512i __W, __mmask16 __U, __m512i __A) +{ + return (__m512i) __builtin_ia32_pabsd512_mask ((__v16si) __A, + (__v16si) __W, + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_abs_epi32 (__mmask16 __U, __m512i __A) +{ + return (__m512i) __builtin_ia32_pabsd512_mask ((__v16si) __A, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) __U); +} + static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_mask_add_ss(__m128 __W, __mmask8 __U,__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_addss_round_mask ((__v4sf) __A, Modified: cfe/trunk/test/CodeGen/avx512f-builtins.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512f-builtins.c?rev=269680&r1=269679&r2=269680&view=diff ============================================================================== --- cfe/trunk/test/CodeGen/avx512f-builtins.c (original) +++ cfe/trunk/test/CodeGen/avx512f-builtins.c Mon May 16 13:57:24 2016 @@ -6574,3 +6574,30 @@ __m512 test_mm512_set_ps (float __A, flo __I, __J, __K, __L, __M, __N, __O, __P); } +__m512i test_mm512_mask_abs_epi64 (__m512i __W, __mmask8 __U, __m512i __A) +{ + // CHECK-LABEL: @test_mm512_mask_abs_epi64 + // CHECK: @llvm.x86.avx512.mask.pabs.q.512 + return _mm512_mask_abs_epi64 (__W,__U,__A); +} + +__m512i test_mm512_maskz_abs_epi64 (__mmask8 __U, __m512i __A) +{ + // CHECK-LABEL: @test_mm512_maskz_abs_epi64 + // CHECK: @llvm.x86.avx512.mask.pabs.q.512 + return _mm512_maskz_abs_epi64 (__U,__A); +} + +__m512i test_mm512_mask_abs_epi32 (__m512i __W, __mmask16 __U, __m512i __A) +{ + // CHECK-LABEL: @test_mm512_mask_abs_epi32 + // CHECK: @llvm.x86.avx512.mask.pabs.d.512 + return _mm512_mask_abs_epi32 (__W,__U,__A); +} + +__m512i test_mm512_maskz_abs_epi32 (__mmask16 __U, __m512i __A) +{ + // CHECK-LABEL: @test_mm512_maskz_abs_epi32 + // CHECK: @llvm.x86.avx512.mask.pabs.d.512 + return _mm512_maskz_abs_epi32 (__U,__A); +} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits