Skip to content

Commit

Permalink
[Clang][AVX512] completing missing intrinsics [pandnd].
Browse files Browse the repository at this point in the history
Differential Revision: http://reviews.llvm.org/D20101

llvm-svn: 269939
  • Loading branch information
Michael Zuckerman authored and Michael Zuckerman committed May 18, 2016
1 parent ab3429c commit 2cacc35
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clang/lib/Headers/avx512fintrin.h
Expand Up @@ -417,6 +417,12 @@ _mm512_maskz_and_epi64(__mmask8 __k, __m512i __a, __m512i __b)
(__mmask8) __k);
}

static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_andnot_si512 (__m512i __A, __m512i __B)
{
return (__m512i)(~(__A) & __B);
}

static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_andnot_epi32 (__m512i __A, __m512i __B)
{
Expand Down
11 changes: 11 additions & 0 deletions clang/test/CodeGen/avx512f-builtins.c
Expand Up @@ -1451,6 +1451,17 @@ __m512i test_mm512_mask_andnot_epi32 (__mmask16 __k,__m512i __A, __m512i __B,
return _mm512_mask_andnot_epi32(__src,__k,__A,__B);
}

__m512i test_mm512_andnot_si512(__m512i __A, __m512i __B)
{
//CHECK-LABLE: @test_mm512_andnot_si512
//CHECK: load {{.*}}%__A.addr.i, align 64
//CHECK: %neg.i = xor{{.*}}, <i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1, i64 -1>
//CHECK: load {{.*}}%__B.addr.i, align 64
//CHECK: and <8 x i64> %neg.i,{{.*}}

return _mm512_andnot_si512(__A, __B);
}

__m512i test_mm512_andnot_epi32(__m512i __A, __m512i __B) {
//CHECK-LABEL: @test_mm512_andnot_epi32
//CHECK: @llvm.x86.avx512.mask.pandn.d.512
Expand Down

0 comments on commit 2cacc35

Please sign in to comment.