r278209 - [X86][AVX512] lower __mm512_andnot_ps/__mm512_andnot_pd to IR
Lama Saba via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 10 03:34:45 PDT 2016
Author: lsaba
Date: Wed Aug 10 05:34:45 2016
New Revision: 278209
URL: http://llvm.org/viewvc/llvm-project?rev=278209&view=rev
Log:
[X86][AVX512] lower __mm512_andnot_ps/__mm512_andnot_pd to IR
Differential revision: https://reviews.llvm.org/D23262
Modified:
cfe/trunk/lib/Headers/avx512dqintrin.h
cfe/trunk/test/CodeGen/avx512dq-builtins.c
Modified: cfe/trunk/lib/Headers/avx512dqintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512dqintrin.h?rev=278209&r1=278208&r2=278209&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512dqintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512dqintrin.h Wed Aug 10 05:34:45 2016
@@ -187,11 +187,7 @@ _mm512_maskz_and_ps (__mmask16 __U, __m5
static __inline__ __m512d __DEFAULT_FN_ATTRS
_mm512_andnot_pd (__m512d __A, __m512d __B) {
- return (__m512d) __builtin_ia32_andnpd512_mask ((__v8df) __A,
- (__v8df) __B,
- (__v8df)
- _mm512_setzero_pd (),
- (__mmask8) -1);
+ return (__m512d)(~(__v8du)__A & (__v8du)__B);
}
static __inline__ __m512d __DEFAULT_FN_ATTRS
@@ -213,11 +209,7 @@ _mm512_maskz_andnot_pd (__mmask8 __U, __
static __inline__ __m512 __DEFAULT_FN_ATTRS
_mm512_andnot_ps (__m512 __A, __m512 __B) {
- return (__m512) __builtin_ia32_andnps512_mask ((__v16sf) __A,
- (__v16sf) __B,
- (__v16sf)
- _mm512_setzero_ps (),
- (__mmask16) -1);
+ return (__m512)(~(__v16su)__A & (__v16su)__B);
}
static __inline__ __m512 __DEFAULT_FN_ATTRS
Modified: cfe/trunk/test/CodeGen/avx512dq-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512dq-builtins.c?rev=278209&r1=278208&r2=278209&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512dq-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512dq-builtins.c Wed Aug 10 05:34:45 2016
@@ -133,7 +133,8 @@ __m512 test_mm512_maskz_and_ps (__mmask1
__m512d test_mm512_andnot_pd (__m512d __A, __m512d __B) {
// CHECK-LABEL: @test_mm512_andnot_pd
- // CHECK: @llvm.x86.avx512.mask.andn.pd.512
+ // CHECK: xor <8 x i64> %{{.*}}, <i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1>
+ // CHECK: and <8 x i64>
return (__m512d) _mm512_andnot_pd(__A, __B);
}
@@ -151,7 +152,8 @@ __m512d test_mm512_maskz_andnot_pd (__mm
__m512 test_mm512_andnot_ps (__m512 __A, __m512 __B) {
// CHECK-LABEL: @test_mm512_andnot_ps
- // CHECK: @llvm.x86.avx512.mask.andn.ps.512
+ // CHECK: xor <16 x i32> %{{.*}}, <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>
+ // CHECK: and <16 x i32>
return (__m512) _mm512_andnot_ps(__A, __B);
}
More information about the cfe-commits
mailing list