r290575 - [AVX-512] Replace masked 512-bit pmuldq and pmuludq builtins with the newly added unmasked versions and selects.
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 26 19:46:16 PST 2016
Author: ctopper
Date: Mon Dec 26 21:46:16 2016
New Revision: 290575
URL: http://llvm.org/viewvc/llvm-project?rev=290575&view=rev
Log:
[AVX-512] Replace masked 512-bit pmuldq and pmuludq builtins with the newly added unmasked versions and selects.
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=290575&r1=290574&r2=290575&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512fintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512fintrin.h Mon Dec 26 21:46:16 2016
@@ -1422,7 +1422,7 @@ _mm512_mul_epi32(__m512i __X, __m512i __
static __inline __m512i __DEFAULT_FN_ATTRS
_mm512_mask_mul_epi32(__m512i __W, __mmask8 __M, __m512i __X, __m512i __Y)
{
- return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
+ return (__m512i)__builtin_ia32_selectq_512((__mmask8)__M,
(__v8di)_mm512_mul_epi32(__X, __Y),
(__v8di)__W);
}
@@ -1430,7 +1430,7 @@ _mm512_mask_mul_epi32(__m512i __W, __mma
static __inline __m512i __DEFAULT_FN_ATTRS
_mm512_maskz_mul_epi32(__mmask8 __M, __m512i __X, __m512i __Y)
{
- return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
+ return (__m512i)__builtin_ia32_selectq_512((__mmask8)__M,
(__v8di)_mm512_mul_epi32(__X, __Y),
(__v8di)_mm512_setzero_si512 ());
}
@@ -1444,7 +1444,7 @@ _mm512_mul_epu32(__m512i __X, __m512i __
static __inline __m512i __DEFAULT_FN_ATTRS
_mm512_mask_mul_epu32(__m512i __W, __mmask8 __M, __m512i __X, __m512i __Y)
{
- return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
+ return (__m512i)__builtin_ia32_selectq_512((__mmask8)__M,
(__v8di)_mm512_mul_epu32(__X, __Y),
(__v8di)__W);
}
@@ -1452,7 +1452,7 @@ _mm512_mask_mul_epu32(__m512i __W, __mma
static __inline __m512i __DEFAULT_FN_ATTRS
_mm512_maskz_mul_epu32(__mmask8 __M, __m512i __X, __m512i __Y)
{
- return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U,
+ return (__m512i)__builtin_ia32_selectq_512((__mmask8)__M,
(__v8di)_mm512_mul_epu32(__X, __Y),
(__v8di)_mm512_setzero_si512 ());
}
Modified: cfe/trunk/test/CodeGen/avx512f-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512f-builtins.c?rev=290575&r1=290574&r2=290575&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512f-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512f-builtins.c Mon Dec 26 21:46:16 2016
@@ -1867,29 +1867,45 @@ __m512i test_mm512_add_epi64(__m512i __A
return _mm512_add_epi64(__A,__B);
}
+__m512i test_mm512_mul_epi32(__m512i __A, __m512i __B) {
+ //CHECK-LABEL: @test_mm512_mul_epi32
+ //CHECK: @llvm.x86.avx512.pmul.dq.512
+ return _mm512_mul_epi32(__A,__B);
+}
+
__m512i test_mm512_maskz_mul_epi32 (__mmask16 __k,__m512i __A, __m512i __B) {
//CHECK-LABEL: @test_mm512_maskz_mul_epi32
- //CHECK: @llvm.x86.avx512.mask.pmul.dq.512
+ //CHECK: @llvm.x86.avx512.pmul.dq.512
+ //CHECK: select <8 x i1> %{{.*}}, <8 x i64> %{{.*}}, <8 x i64> %{{.*}}
return _mm512_maskz_mul_epi32(__k,__A,__B);
}
__m512i test_mm512_mask_mul_epi32 (__mmask16 __k,__m512i __A, __m512i __B,
__m512i __src) {
//CHECK-LABEL: @test_mm512_mask_mul_epi32
- //CHECK: @llvm.x86.avx512.mask.pmul.dq.512
+ //CHECK: @llvm.x86.avx512.pmul.dq.512
+ //CHECK: select <8 x i1> %{{.*}}, <8 x i64> %{{.*}}, <8 x i64> %{{.*}}
return _mm512_mask_mul_epi32(__src,__k,__A,__B);
}
+__m512i test_mm512_mul_epu32 (__m512i __A, __m512i __B) {
+ //CHECK-LABEL: @test_mm512_mul_epu32
+ //CHECK: @llvm.x86.avx512.pmulu.dq.512
+ return _mm512_mul_epu32(__A,__B);
+}
+
__m512i test_mm512_maskz_mul_epu32 (__mmask16 __k,__m512i __A, __m512i __B) {
//CHECK-LABEL: @test_mm512_maskz_mul_epu32
- //CHECK: @llvm.x86.avx512.mask.pmulu.dq.512
+ //CHECK: @llvm.x86.avx512.pmulu.dq.512
+ //CHECK: select <8 x i1> %{{.*}}, <8 x i64> %{{.*}}, <8 x i64> %{{.*}}
return _mm512_maskz_mul_epu32(__k,__A,__B);
}
__m512i test_mm512_mask_mul_epu32 (__mmask16 __k,__m512i __A, __m512i __B,
__m512i __src) {
//CHECK-LABEL: @test_mm512_mask_mul_epu32
- //CHECK: @llvm.x86.avx512.mask.pmulu.dq.512
+ //CHECK: @llvm.x86.avx512.pmulu.dq.512
+ //CHECK: select <8 x i1> %{{.*}}, <8 x i64> %{{.*}}, <8 x i64> %{{.*}}
return _mm512_mask_mul_epu32(__src,__k,__A,__B);
}
More information about the cfe-commits
mailing list