[X86] Add some non-AVX512VL command lines to the *vl-vec-test-testn.ll tests.

This will expose some regressions in the WIP and/or/xor promotion removal patch.

llvm-svn: 345297
This commit is contained in:
Craig Topper 2018-10-25 18:23:48 +00:00
parent 84eaf0c9e4
commit 4a825e7b29
2 changed files with 746 additions and 341 deletions

View File

@ -1,14 +1,25 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bw,+avx512vl | FileCheck %s
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bw,+avx512vl | FileCheck %s --check-prefix=AVX512BWVL
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bw | FileCheck %s --check-prefix=AVX512BW
; Function Attrs: norecurse nounwind readnone
define zeroext i16 @TEST_mm_test_epi8_mask(<2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm_test_epi8_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestmb %xmm0, %xmm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm_test_epi8_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestmb %xmm0, %xmm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm_test_epi8_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512BW-NEXT: vptestmb %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = bitcast <2 x i64> %and.i.i to <16 x i8>
@ -19,13 +30,24 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i16 @TEST_mm_mask_test_epi8_mask(i16 zeroext %__U, <2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm_mask_test_epi8_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestmb %xmm0, %xmm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: andl %edi, %eax
; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm_mask_test_epi8_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestmb %xmm0, %xmm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: andl %edi, %eax
; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm_mask_test_epi8_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512BW-NEXT: vptestmb %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: andl %edi, %eax
; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = bitcast <2 x i64> %and.i.i to <16 x i8>
@ -38,12 +60,22 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm_test_epi16_mask(<2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm_test_epi16_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestmw %xmm0, %xmm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: # kill: def $al killed $al killed $eax
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm_test_epi16_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestmw %xmm0, %xmm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: # kill: def $al killed $al killed $eax
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm_test_epi16_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512BW-NEXT: vptestmw %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: # kill: def $al killed $al killed $eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = bitcast <2 x i64> %and.i.i to <8 x i16>
@ -54,13 +86,24 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm_mask_test_epi16_mask(i8 zeroext %__U, <2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm_mask_test_epi16_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestmw %xmm0, %xmm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: andb %dil, %al
; CHECK-NEXT: # kill: def $al killed $al killed $eax
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm_mask_test_epi16_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestmw %xmm0, %xmm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: andb %dil, %al
; AVX512BWVL-NEXT: # kill: def $al killed $al killed $eax
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm_mask_test_epi16_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512BW-NEXT: vptestmw %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: andb %dil, %al
; AVX512BW-NEXT: # kill: def $al killed $al killed $eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = bitcast <2 x i64> %and.i.i to <8 x i16>
@ -73,12 +116,22 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i16 @TEST_mm_testn_epi8_mask(<2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm_testn_epi8_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestnmb %xmm0, %xmm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm_testn_epi8_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestnmb %xmm0, %xmm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm_testn_epi8_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512BW-NEXT: vptestnmb %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = bitcast <2 x i64> %and.i.i to <16 x i8>
@ -89,13 +142,24 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i16 @TEST_mm_mask_testn_epi8_mask(i16 zeroext %__U, <2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm_mask_testn_epi8_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestnmb %xmm0, %xmm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: andl %edi, %eax
; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm_mask_testn_epi8_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestnmb %xmm0, %xmm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: andl %edi, %eax
; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm_mask_testn_epi8_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512BW-NEXT: vptestnmb %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: andl %edi, %eax
; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = bitcast <2 x i64> %and.i.i to <16 x i8>
@ -108,12 +172,22 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm_testn_epi16_mask(<2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm_testn_epi16_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestnmw %xmm0, %xmm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: # kill: def $al killed $al killed $eax
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm_testn_epi16_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestnmw %xmm0, %xmm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: # kill: def $al killed $al killed $eax
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm_testn_epi16_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512BW-NEXT: vptestnmw %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: # kill: def $al killed $al killed $eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = bitcast <2 x i64> %and.i.i to <8 x i16>
@ -124,13 +198,24 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm_mask_testn_epi16_mask(i8 zeroext %__U, <2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm_mask_testn_epi16_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestnmw %xmm0, %xmm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: andb %dil, %al
; CHECK-NEXT: # kill: def $al killed $al killed $eax
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm_mask_testn_epi16_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestnmw %xmm0, %xmm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: andb %dil, %al
; AVX512BWVL-NEXT: # kill: def $al killed $al killed $eax
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm_mask_testn_epi16_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512BW-NEXT: vptestnmw %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: andb %dil, %al
; AVX512BW-NEXT: # kill: def $al killed $al killed $eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = bitcast <2 x i64> %and.i.i to <8 x i16>
@ -143,12 +228,21 @@ entry:
; Function Attrs: norecurse nounwind readnone
define i32 @TEST_mm256_test_epi8_mask(<4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm256_test_epi8_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestmb %ymm0, %ymm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: vzeroupper
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm256_test_epi8_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestmb %ymm0, %ymm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: vzeroupper
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm256_test_epi8_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512BW-NEXT: vptestmb %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = bitcast <4 x i64> %and.i.i to <32 x i8>
@ -159,13 +253,23 @@ entry:
; Function Attrs: norecurse nounwind readnone
define i32 @TEST_mm256_mask_test_epi8_mask(i32 %__U, <4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm256_mask_test_epi8_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestmb %ymm0, %ymm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: andl %edi, %eax
; CHECK-NEXT: vzeroupper
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm256_mask_test_epi8_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestmb %ymm0, %ymm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: andl %edi, %eax
; AVX512BWVL-NEXT: vzeroupper
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm256_mask_test_epi8_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512BW-NEXT: vptestmb %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: andl %edi, %eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = bitcast <4 x i64> %and.i.i to <32 x i8>
@ -178,13 +282,23 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i16 @TEST_mm256_test_epi16_mask(<4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm256_test_epi16_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestmw %ymm0, %ymm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
; CHECK-NEXT: vzeroupper
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm256_test_epi16_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestmw %ymm0, %ymm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BWVL-NEXT: vzeroupper
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm256_test_epi16_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512BW-NEXT: vptestmw %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = bitcast <4 x i64> %and.i.i to <16 x i16>
@ -195,14 +309,25 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i16 @TEST_mm256_mask_test_epi16_mask(i16 zeroext %__U, <4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm256_mask_test_epi16_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestmw %ymm0, %ymm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: andl %edi, %eax
; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
; CHECK-NEXT: vzeroupper
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm256_mask_test_epi16_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestmw %ymm0, %ymm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: andl %edi, %eax
; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BWVL-NEXT: vzeroupper
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm256_mask_test_epi16_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512BW-NEXT: vptestmw %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: andl %edi, %eax
; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = bitcast <4 x i64> %and.i.i to <16 x i16>
@ -215,12 +340,21 @@ entry:
; Function Attrs: norecurse nounwind readnone
define i32 @TEST_mm256_testn_epi8_mask(<4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm256_testn_epi8_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestnmb %ymm0, %ymm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: vzeroupper
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm256_testn_epi8_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestnmb %ymm0, %ymm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: vzeroupper
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm256_testn_epi8_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512BW-NEXT: vptestnmb %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = bitcast <4 x i64> %and.i.i to <32 x i8>
@ -231,13 +365,23 @@ entry:
; Function Attrs: norecurse nounwind readnone
define i32 @TEST_mm256_mask_testn_epi8_mask(i32 %__U, <4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm256_mask_testn_epi8_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestnmb %ymm0, %ymm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: andl %edi, %eax
; CHECK-NEXT: vzeroupper
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm256_mask_testn_epi8_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestnmb %ymm0, %ymm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: andl %edi, %eax
; AVX512BWVL-NEXT: vzeroupper
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm256_mask_testn_epi8_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512BW-NEXT: vptestnmb %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: andl %edi, %eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = bitcast <4 x i64> %and.i.i to <32 x i8>
@ -250,13 +394,23 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i16 @TEST_mm256_testn_epi16_mask(<4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm256_testn_epi16_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestnmw %ymm0, %ymm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
; CHECK-NEXT: vzeroupper
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm256_testn_epi16_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestnmw %ymm0, %ymm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BWVL-NEXT: vzeroupper
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm256_testn_epi16_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512BW-NEXT: vptestnmw %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = bitcast <4 x i64> %and.i.i to <16 x i16>
@ -267,14 +421,25 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i16 @TEST_mm256_mask_testn_epi16_mask(i16 zeroext %__U, <4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; CHECK-LABEL: TEST_mm256_mask_testn_epi16_mask:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: vptestnmw %ymm0, %ymm1, %k0
; CHECK-NEXT: kmovd %k0, %eax
; CHECK-NEXT: andl %edi, %eax
; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
; CHECK-NEXT: vzeroupper
; CHECK-NEXT: retq
; AVX512BWVL-LABEL: TEST_mm256_mask_testn_epi16_mask:
; AVX512BWVL: # %bb.0: # %entry
; AVX512BWVL-NEXT: vptestnmw %ymm0, %ymm1, %k0
; AVX512BWVL-NEXT: kmovd %k0, %eax
; AVX512BWVL-NEXT: andl %edi, %eax
; AVX512BWVL-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BWVL-NEXT: vzeroupper
; AVX512BWVL-NEXT: retq
;
; AVX512BW-LABEL: TEST_mm256_mask_testn_epi16_mask:
; AVX512BW: # %bb.0: # %entry
; AVX512BW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512BW-NEXT: vptestnmw %zmm0, %zmm1, %k0
; AVX512BW-NEXT: kmovd %k0, %eax
; AVX512BW-NEXT: andl %edi, %eax
; AVX512BW-NEXT: # kill: def $ax killed $ax killed $eax
; AVX512BW-NEXT: vzeroupper
; AVX512BW-NEXT: retq
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = bitcast <4 x i64> %and.i.i to <16 x i16>

View File

@ -1,22 +1,29 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl | FileCheck %s --check-prefix=X86_64
; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+avx512vl | FileCheck %s --check-prefix=I386
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl | FileCheck %s --check-prefix=AVX512VL --check-prefix=AVX512VL-X64
; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+avx512vl | FileCheck %s --check-prefix=AVX512VL --check-prefix=AVX512VL-X86
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefix=AVX512F --check-prefix=AVX512F-X64
; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefix=AVX512F --check-prefix=AVX512F-X86
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm_test_epi64_mask(<2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm_test_epi64_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: vptestmq %xmm0, %xmm1, %k0
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: retq
; AVX512VL-LABEL: TEST_mm_test_epi64_mask:
; AVX512VL: # %bb.0: # %entry
; AVX512VL-NEXT: vptestmq %xmm0, %xmm1, %k0
; AVX512VL-NEXT: kmovw %k0, %eax
; AVX512VL-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-NEXT: ret{{[l|q]}}
;
; I386-LABEL: TEST_mm_test_epi64_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: vptestmq %xmm0, %xmm1, %k0
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: retl
; AVX512F-LABEL: TEST_mm_test_epi64_mask:
; AVX512F: # %bb.0: # %entry
; AVX512F-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512F-NEXT: vptestmq %zmm0, %zmm1, %k0
; AVX512F-NEXT: kshiftlw $14, %k0, %k0
; AVX512F-NEXT: kshiftrw $14, %k0, %k0
; AVX512F-NEXT: kmovw %k0, %eax
; AVX512F-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-NEXT: vzeroupper
; AVX512F-NEXT: ret{{[l|q]}}
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = icmp ne <2 x i64> %and.i.i, zeroinitializer
@ -27,19 +34,24 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm_test_epi32_mask(<2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm_test_epi32_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: vptestmd %xmm0, %xmm1, %k0
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: retq
; AVX512VL-LABEL: TEST_mm_test_epi32_mask:
; AVX512VL: # %bb.0: # %entry
; AVX512VL-NEXT: vptestmd %xmm0, %xmm1, %k0
; AVX512VL-NEXT: kmovw %k0, %eax
; AVX512VL-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-NEXT: ret{{[l|q]}}
;
; I386-LABEL: TEST_mm_test_epi32_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: vptestmd %xmm0, %xmm1, %k0
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: retl
; AVX512F-LABEL: TEST_mm_test_epi32_mask:
; AVX512F: # %bb.0: # %entry
; AVX512F-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512F-NEXT: vptestmd %zmm0, %zmm1, %k0
; AVX512F-NEXT: kshiftlw $12, %k0, %k0
; AVX512F-NEXT: kshiftrw $12, %k0, %k0
; AVX512F-NEXT: kmovw %k0, %eax
; AVX512F-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-NEXT: vzeroupper
; AVX512F-NEXT: ret{{[l|q]}}
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = bitcast <2 x i64> %and.i.i to <4 x i32>
@ -51,21 +63,25 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm256_test_epi64_mask(<4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm256_test_epi64_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: vptestmq %ymm0, %ymm1, %k0
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: vzeroupper
; X86_64-NEXT: retq
; AVX512VL-LABEL: TEST_mm256_test_epi64_mask:
; AVX512VL: # %bb.0: # %entry
; AVX512VL-NEXT: vptestmq %ymm0, %ymm1, %k0
; AVX512VL-NEXT: kmovw %k0, %eax
; AVX512VL-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-NEXT: vzeroupper
; AVX512VL-NEXT: ret{{[l|q]}}
;
; I386-LABEL: TEST_mm256_test_epi64_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: vptestmq %ymm0, %ymm1, %k0
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: vzeroupper
; I386-NEXT: retl
; AVX512F-LABEL: TEST_mm256_test_epi64_mask:
; AVX512F: # %bb.0: # %entry
; AVX512F-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512F-NEXT: vptestmq %zmm0, %zmm1, %k0
; AVX512F-NEXT: kshiftlw $12, %k0, %k0
; AVX512F-NEXT: kshiftrw $12, %k0, %k0
; AVX512F-NEXT: kmovw %k0, %eax
; AVX512F-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-NEXT: vzeroupper
; AVX512F-NEXT: ret{{[l|q]}}
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = icmp ne <4 x i64> %and.i.i, zeroinitializer
@ -76,21 +92,23 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm256_test_epi32_mask(<4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm256_test_epi32_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: vptestmd %ymm0, %ymm1, %k0
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: vzeroupper
; X86_64-NEXT: retq
; AVX512VL-LABEL: TEST_mm256_test_epi32_mask:
; AVX512VL: # %bb.0: # %entry
; AVX512VL-NEXT: vptestmd %ymm0, %ymm1, %k0
; AVX512VL-NEXT: kmovw %k0, %eax
; AVX512VL-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-NEXT: vzeroupper
; AVX512VL-NEXT: ret{{[l|q]}}
;
; I386-LABEL: TEST_mm256_test_epi32_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: vptestmd %ymm0, %ymm1, %k0
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: vzeroupper
; I386-NEXT: retl
; AVX512F-LABEL: TEST_mm256_test_epi32_mask:
; AVX512F: # %bb.0: # %entry
; AVX512F-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512F-NEXT: vptestmd %zmm0, %zmm1, %k0
; AVX512F-NEXT: kmovw %k0, %eax
; AVX512F-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-NEXT: vzeroupper
; AVX512F-NEXT: ret{{[l|q]}}
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = bitcast <4 x i64> %and.i.i to <8 x i32>
@ -101,22 +119,49 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm_mask_test_epi64_mask(i8 %__U, <2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm_mask_test_epi64_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: kmovw %edi, %k1
; X86_64-NEXT: vptestmq %xmm0, %xmm1, %k0 {%k1}
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: retq
; AVX512VL-X64-LABEL: TEST_mm_mask_test_epi64_mask:
; AVX512VL-X64: # %bb.0: # %entry
; AVX512VL-X64-NEXT: kmovw %edi, %k1
; AVX512VL-X64-NEXT: vptestmq %xmm0, %xmm1, %k0 {%k1}
; AVX512VL-X64-NEXT: kmovw %k0, %eax
; AVX512VL-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X64-NEXT: retq
;
; I386-LABEL: TEST_mm_mask_test_epi64_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; I386-NEXT: kmovw %eax, %k1
; I386-NEXT: vptestmq %xmm0, %xmm1, %k0 {%k1}
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: retl
; AVX512VL-X86-LABEL: TEST_mm_mask_test_epi64_mask:
; AVX512VL-X86: # %bb.0: # %entry
; AVX512VL-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; AVX512VL-X86-NEXT: kmovw %eax, %k1
; AVX512VL-X86-NEXT: vptestmq %xmm0, %xmm1, %k0 {%k1}
; AVX512VL-X86-NEXT: kmovw %k0, %eax
; AVX512VL-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X86-NEXT: retl
;
; AVX512F-X64-LABEL: TEST_mm_mask_test_epi64_mask:
; AVX512F-X64: # %bb.0: # %entry
; AVX512F-X64-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512F-X64-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512F-X64-NEXT: kmovw %edi, %k1
; AVX512F-X64-NEXT: vptestmq %zmm0, %zmm1, %k0 {%k1}
; AVX512F-X64-NEXT: kshiftlw $14, %k0, %k0
; AVX512F-X64-NEXT: kshiftrw $14, %k0, %k0
; AVX512F-X64-NEXT: kmovw %k0, %eax
; AVX512F-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X64-NEXT: vzeroupper
; AVX512F-X64-NEXT: retq
;
; AVX512F-X86-LABEL: TEST_mm_mask_test_epi64_mask:
; AVX512F-X86: # %bb.0: # %entry
; AVX512F-X86-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512F-X86-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512F-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; AVX512F-X86-NEXT: kmovw %eax, %k1
; AVX512F-X86-NEXT: vptestmq %zmm0, %zmm1, %k0 {%k1}
; AVX512F-X86-NEXT: kshiftlw $14, %k0, %k0
; AVX512F-X86-NEXT: kshiftrw $14, %k0, %k0
; AVX512F-X86-NEXT: kmovw %k0, %eax
; AVX512F-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X86-NEXT: vzeroupper
; AVX512F-X86-NEXT: retl
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = icmp ne <2 x i64> %and.i.i, zeroinitializer
@ -130,22 +175,49 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm_mask_test_epi32_mask(i8 %__U, <2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm_mask_test_epi32_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: kmovw %edi, %k1
; X86_64-NEXT: vptestmd %xmm0, %xmm1, %k0 {%k1}
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: retq
; AVX512VL-X64-LABEL: TEST_mm_mask_test_epi32_mask:
; AVX512VL-X64: # %bb.0: # %entry
; AVX512VL-X64-NEXT: kmovw %edi, %k1
; AVX512VL-X64-NEXT: vptestmd %xmm0, %xmm1, %k0 {%k1}
; AVX512VL-X64-NEXT: kmovw %k0, %eax
; AVX512VL-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X64-NEXT: retq
;
; I386-LABEL: TEST_mm_mask_test_epi32_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; I386-NEXT: kmovw %eax, %k1
; I386-NEXT: vptestmd %xmm0, %xmm1, %k0 {%k1}
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: retl
; AVX512VL-X86-LABEL: TEST_mm_mask_test_epi32_mask:
; AVX512VL-X86: # %bb.0: # %entry
; AVX512VL-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; AVX512VL-X86-NEXT: kmovw %eax, %k1
; AVX512VL-X86-NEXT: vptestmd %xmm0, %xmm1, %k0 {%k1}
; AVX512VL-X86-NEXT: kmovw %k0, %eax
; AVX512VL-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X86-NEXT: retl
;
; AVX512F-X64-LABEL: TEST_mm_mask_test_epi32_mask:
; AVX512F-X64: # %bb.0: # %entry
; AVX512F-X64-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512F-X64-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512F-X64-NEXT: kmovw %edi, %k1
; AVX512F-X64-NEXT: vptestmd %zmm0, %zmm1, %k0 {%k1}
; AVX512F-X64-NEXT: kshiftlw $12, %k0, %k0
; AVX512F-X64-NEXT: kshiftrw $12, %k0, %k0
; AVX512F-X64-NEXT: kmovw %k0, %eax
; AVX512F-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X64-NEXT: vzeroupper
; AVX512F-X64-NEXT: retq
;
; AVX512F-X86-LABEL: TEST_mm_mask_test_epi32_mask:
; AVX512F-X86: # %bb.0: # %entry
; AVX512F-X86-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512F-X86-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512F-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; AVX512F-X86-NEXT: kmovw %eax, %k1
; AVX512F-X86-NEXT: vptestmd %zmm0, %zmm1, %k0 {%k1}
; AVX512F-X86-NEXT: kshiftlw $12, %k0, %k0
; AVX512F-X86-NEXT: kshiftrw $12, %k0, %k0
; AVX512F-X86-NEXT: kmovw %k0, %eax
; AVX512F-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X86-NEXT: vzeroupper
; AVX512F-X86-NEXT: retl
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = bitcast <2 x i64> %and.i.i to <4 x i32>
@ -161,24 +233,51 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm256_mask_test_epi64_mask(i8 %__U, <4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm256_mask_test_epi64_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: kmovw %edi, %k1
; X86_64-NEXT: vptestmq %ymm0, %ymm1, %k0 {%k1}
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: vzeroupper
; X86_64-NEXT: retq
; AVX512VL-X64-LABEL: TEST_mm256_mask_test_epi64_mask:
; AVX512VL-X64: # %bb.0: # %entry
; AVX512VL-X64-NEXT: kmovw %edi, %k1
; AVX512VL-X64-NEXT: vptestmq %ymm0, %ymm1, %k0 {%k1}
; AVX512VL-X64-NEXT: kmovw %k0, %eax
; AVX512VL-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X64-NEXT: vzeroupper
; AVX512VL-X64-NEXT: retq
;
; I386-LABEL: TEST_mm256_mask_test_epi64_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; I386-NEXT: kmovw %eax, %k1
; I386-NEXT: vptestmq %ymm0, %ymm1, %k0 {%k1}
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: vzeroupper
; I386-NEXT: retl
; AVX512VL-X86-LABEL: TEST_mm256_mask_test_epi64_mask:
; AVX512VL-X86: # %bb.0: # %entry
; AVX512VL-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; AVX512VL-X86-NEXT: kmovw %eax, %k1
; AVX512VL-X86-NEXT: vptestmq %ymm0, %ymm1, %k0 {%k1}
; AVX512VL-X86-NEXT: kmovw %k0, %eax
; AVX512VL-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X86-NEXT: vzeroupper
; AVX512VL-X86-NEXT: retl
;
; AVX512F-X64-LABEL: TEST_mm256_mask_test_epi64_mask:
; AVX512F-X64: # %bb.0: # %entry
; AVX512F-X64-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512F-X64-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512F-X64-NEXT: kmovw %edi, %k1
; AVX512F-X64-NEXT: vptestmq %zmm0, %zmm1, %k0 {%k1}
; AVX512F-X64-NEXT: kshiftlw $12, %k0, %k0
; AVX512F-X64-NEXT: kshiftrw $12, %k0, %k0
; AVX512F-X64-NEXT: kmovw %k0, %eax
; AVX512F-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X64-NEXT: vzeroupper
; AVX512F-X64-NEXT: retq
;
; AVX512F-X86-LABEL: TEST_mm256_mask_test_epi64_mask:
; AVX512F-X86: # %bb.0: # %entry
; AVX512F-X86-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512F-X86-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512F-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; AVX512F-X86-NEXT: kmovw %eax, %k1
; AVX512F-X86-NEXT: vptestmq %zmm0, %zmm1, %k0 {%k1}
; AVX512F-X86-NEXT: kshiftlw $12, %k0, %k0
; AVX512F-X86-NEXT: kshiftrw $12, %k0, %k0
; AVX512F-X86-NEXT: kmovw %k0, %eax
; AVX512F-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X86-NEXT: vzeroupper
; AVX512F-X86-NEXT: retl
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = icmp ne <4 x i64> %and.i.i, zeroinitializer
@ -192,23 +291,45 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm256_mask_test_epi32_mask(i8 %__U, <4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm256_mask_test_epi32_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: vptestmd %ymm0, %ymm1, %k0
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: andb %dil, %al
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: vzeroupper
; X86_64-NEXT: retq
; AVX512VL-X64-LABEL: TEST_mm256_mask_test_epi32_mask:
; AVX512VL-X64: # %bb.0: # %entry
; AVX512VL-X64-NEXT: vptestmd %ymm0, %ymm1, %k0
; AVX512VL-X64-NEXT: kmovw %k0, %eax
; AVX512VL-X64-NEXT: andb %dil, %al
; AVX512VL-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X64-NEXT: vzeroupper
; AVX512VL-X64-NEXT: retq
;
; I386-LABEL: TEST_mm256_mask_test_epi32_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: vptestmd %ymm0, %ymm1, %k0
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: andb {{[0-9]+}}(%esp), %al
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: vzeroupper
; I386-NEXT: retl
; AVX512VL-X86-LABEL: TEST_mm256_mask_test_epi32_mask:
; AVX512VL-X86: # %bb.0: # %entry
; AVX512VL-X86-NEXT: vptestmd %ymm0, %ymm1, %k0
; AVX512VL-X86-NEXT: kmovw %k0, %eax
; AVX512VL-X86-NEXT: andb {{[0-9]+}}(%esp), %al
; AVX512VL-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X86-NEXT: vzeroupper
; AVX512VL-X86-NEXT: retl
;
; AVX512F-X64-LABEL: TEST_mm256_mask_test_epi32_mask:
; AVX512F-X64: # %bb.0: # %entry
; AVX512F-X64-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512F-X64-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512F-X64-NEXT: vptestmd %zmm0, %zmm1, %k0
; AVX512F-X64-NEXT: kmovw %k0, %eax
; AVX512F-X64-NEXT: andb %dil, %al
; AVX512F-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X64-NEXT: vzeroupper
; AVX512F-X64-NEXT: retq
;
; AVX512F-X86-LABEL: TEST_mm256_mask_test_epi32_mask:
; AVX512F-X86: # %bb.0: # %entry
; AVX512F-X86-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512F-X86-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512F-X86-NEXT: vptestmd %zmm0, %zmm1, %k0
; AVX512F-X86-NEXT: kmovw %k0, %eax
; AVX512F-X86-NEXT: andb {{[0-9]+}}(%esp), %al
; AVX512F-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X86-NEXT: vzeroupper
; AVX512F-X86-NEXT: retl
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = bitcast <4 x i64> %and.i.i to <8 x i32>
@ -221,19 +342,24 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm_testn_epi64_mask(<2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm_testn_epi64_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: vptestnmq %xmm0, %xmm1, %k0
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: retq
; AVX512VL-LABEL: TEST_mm_testn_epi64_mask:
; AVX512VL: # %bb.0: # %entry
; AVX512VL-NEXT: vptestnmq %xmm0, %xmm1, %k0
; AVX512VL-NEXT: kmovw %k0, %eax
; AVX512VL-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-NEXT: ret{{[l|q]}}
;
; I386-LABEL: TEST_mm_testn_epi64_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: vptestnmq %xmm0, %xmm1, %k0
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: retl
; AVX512F-LABEL: TEST_mm_testn_epi64_mask:
; AVX512F: # %bb.0: # %entry
; AVX512F-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512F-NEXT: vptestnmq %zmm0, %zmm1, %k0
; AVX512F-NEXT: kshiftlw $14, %k0, %k0
; AVX512F-NEXT: kshiftrw $14, %k0, %k0
; AVX512F-NEXT: kmovw %k0, %eax
; AVX512F-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-NEXT: vzeroupper
; AVX512F-NEXT: ret{{[l|q]}}
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = icmp eq <2 x i64> %and.i.i, zeroinitializer
@ -244,19 +370,24 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm_testn_epi32_mask(<2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm_testn_epi32_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: vptestnmd %xmm0, %xmm1, %k0
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: retq
; AVX512VL-LABEL: TEST_mm_testn_epi32_mask:
; AVX512VL: # %bb.0: # %entry
; AVX512VL-NEXT: vptestnmd %xmm0, %xmm1, %k0
; AVX512VL-NEXT: kmovw %k0, %eax
; AVX512VL-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-NEXT: ret{{[l|q]}}
;
; I386-LABEL: TEST_mm_testn_epi32_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: vptestnmd %xmm0, %xmm1, %k0
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: retl
; AVX512F-LABEL: TEST_mm_testn_epi32_mask:
; AVX512F: # %bb.0: # %entry
; AVX512F-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512F-NEXT: vptestnmd %zmm0, %zmm1, %k0
; AVX512F-NEXT: kshiftlw $12, %k0, %k0
; AVX512F-NEXT: kshiftrw $12, %k0, %k0
; AVX512F-NEXT: kmovw %k0, %eax
; AVX512F-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-NEXT: vzeroupper
; AVX512F-NEXT: ret{{[l|q]}}
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = bitcast <2 x i64> %and.i.i to <4 x i32>
@ -268,21 +399,25 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm256_testn_epi64_mask(<4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm256_testn_epi64_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: vptestnmq %ymm0, %ymm1, %k0
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: vzeroupper
; X86_64-NEXT: retq
; AVX512VL-LABEL: TEST_mm256_testn_epi64_mask:
; AVX512VL: # %bb.0: # %entry
; AVX512VL-NEXT: vptestnmq %ymm0, %ymm1, %k0
; AVX512VL-NEXT: kmovw %k0, %eax
; AVX512VL-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-NEXT: vzeroupper
; AVX512VL-NEXT: ret{{[l|q]}}
;
; I386-LABEL: TEST_mm256_testn_epi64_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: vptestnmq %ymm0, %ymm1, %k0
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: vzeroupper
; I386-NEXT: retl
; AVX512F-LABEL: TEST_mm256_testn_epi64_mask:
; AVX512F: # %bb.0: # %entry
; AVX512F-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512F-NEXT: vptestnmq %zmm0, %zmm1, %k0
; AVX512F-NEXT: kshiftlw $12, %k0, %k0
; AVX512F-NEXT: kshiftrw $12, %k0, %k0
; AVX512F-NEXT: kmovw %k0, %eax
; AVX512F-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-NEXT: vzeroupper
; AVX512F-NEXT: ret{{[l|q]}}
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = icmp eq <4 x i64> %and.i.i, zeroinitializer
@ -293,21 +428,23 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm256_testn_epi32_mask(<4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm256_testn_epi32_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: vptestnmd %ymm0, %ymm1, %k0
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: vzeroupper
; X86_64-NEXT: retq
; AVX512VL-LABEL: TEST_mm256_testn_epi32_mask:
; AVX512VL: # %bb.0: # %entry
; AVX512VL-NEXT: vptestnmd %ymm0, %ymm1, %k0
; AVX512VL-NEXT: kmovw %k0, %eax
; AVX512VL-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-NEXT: vzeroupper
; AVX512VL-NEXT: ret{{[l|q]}}
;
; I386-LABEL: TEST_mm256_testn_epi32_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: vptestnmd %ymm0, %ymm1, %k0
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: vzeroupper
; I386-NEXT: retl
; AVX512F-LABEL: TEST_mm256_testn_epi32_mask:
; AVX512F: # %bb.0: # %entry
; AVX512F-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512F-NEXT: vptestnmd %zmm0, %zmm1, %k0
; AVX512F-NEXT: kmovw %k0, %eax
; AVX512F-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-NEXT: vzeroupper
; AVX512F-NEXT: ret{{[l|q]}}
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = bitcast <4 x i64> %and.i.i to <8 x i32>
@ -318,22 +455,49 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm_mask_testn_epi64_mask(i8 %__U, <2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm_mask_testn_epi64_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: kmovw %edi, %k1
; X86_64-NEXT: vptestnmq %xmm0, %xmm1, %k0 {%k1}
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: retq
; AVX512VL-X64-LABEL: TEST_mm_mask_testn_epi64_mask:
; AVX512VL-X64: # %bb.0: # %entry
; AVX512VL-X64-NEXT: kmovw %edi, %k1
; AVX512VL-X64-NEXT: vptestnmq %xmm0, %xmm1, %k0 {%k1}
; AVX512VL-X64-NEXT: kmovw %k0, %eax
; AVX512VL-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X64-NEXT: retq
;
; I386-LABEL: TEST_mm_mask_testn_epi64_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; I386-NEXT: kmovw %eax, %k1
; I386-NEXT: vptestnmq %xmm0, %xmm1, %k0 {%k1}
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: retl
; AVX512VL-X86-LABEL: TEST_mm_mask_testn_epi64_mask:
; AVX512VL-X86: # %bb.0: # %entry
; AVX512VL-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; AVX512VL-X86-NEXT: kmovw %eax, %k1
; AVX512VL-X86-NEXT: vptestnmq %xmm0, %xmm1, %k0 {%k1}
; AVX512VL-X86-NEXT: kmovw %k0, %eax
; AVX512VL-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X86-NEXT: retl
;
; AVX512F-X64-LABEL: TEST_mm_mask_testn_epi64_mask:
; AVX512F-X64: # %bb.0: # %entry
; AVX512F-X64-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512F-X64-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512F-X64-NEXT: kmovw %edi, %k1
; AVX512F-X64-NEXT: vptestnmq %zmm0, %zmm1, %k0 {%k1}
; AVX512F-X64-NEXT: kshiftlw $14, %k0, %k0
; AVX512F-X64-NEXT: kshiftrw $14, %k0, %k0
; AVX512F-X64-NEXT: kmovw %k0, %eax
; AVX512F-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X64-NEXT: vzeroupper
; AVX512F-X64-NEXT: retq
;
; AVX512F-X86-LABEL: TEST_mm_mask_testn_epi64_mask:
; AVX512F-X86: # %bb.0: # %entry
; AVX512F-X86-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512F-X86-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512F-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; AVX512F-X86-NEXT: kmovw %eax, %k1
; AVX512F-X86-NEXT: vptestnmq %zmm0, %zmm1, %k0 {%k1}
; AVX512F-X86-NEXT: kshiftlw $14, %k0, %k0
; AVX512F-X86-NEXT: kshiftrw $14, %k0, %k0
; AVX512F-X86-NEXT: kmovw %k0, %eax
; AVX512F-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X86-NEXT: vzeroupper
; AVX512F-X86-NEXT: retl
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = icmp eq <2 x i64> %and.i.i, zeroinitializer
@ -347,22 +511,49 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm_mask_testn_epi32_mask(i8 %__U, <2 x i64> %__A, <2 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm_mask_testn_epi32_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: kmovw %edi, %k1
; X86_64-NEXT: vptestnmd %xmm0, %xmm1, %k0 {%k1}
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: retq
; AVX512VL-X64-LABEL: TEST_mm_mask_testn_epi32_mask:
; AVX512VL-X64: # %bb.0: # %entry
; AVX512VL-X64-NEXT: kmovw %edi, %k1
; AVX512VL-X64-NEXT: vptestnmd %xmm0, %xmm1, %k0 {%k1}
; AVX512VL-X64-NEXT: kmovw %k0, %eax
; AVX512VL-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X64-NEXT: retq
;
; I386-LABEL: TEST_mm_mask_testn_epi32_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; I386-NEXT: kmovw %eax, %k1
; I386-NEXT: vptestnmd %xmm0, %xmm1, %k0 {%k1}
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: retl
; AVX512VL-X86-LABEL: TEST_mm_mask_testn_epi32_mask:
; AVX512VL-X86: # %bb.0: # %entry
; AVX512VL-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; AVX512VL-X86-NEXT: kmovw %eax, %k1
; AVX512VL-X86-NEXT: vptestnmd %xmm0, %xmm1, %k0 {%k1}
; AVX512VL-X86-NEXT: kmovw %k0, %eax
; AVX512VL-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X86-NEXT: retl
;
; AVX512F-X64-LABEL: TEST_mm_mask_testn_epi32_mask:
; AVX512F-X64: # %bb.0: # %entry
; AVX512F-X64-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512F-X64-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512F-X64-NEXT: kmovw %edi, %k1
; AVX512F-X64-NEXT: vptestnmd %zmm0, %zmm1, %k0 {%k1}
; AVX512F-X64-NEXT: kshiftlw $12, %k0, %k0
; AVX512F-X64-NEXT: kshiftrw $12, %k0, %k0
; AVX512F-X64-NEXT: kmovw %k0, %eax
; AVX512F-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X64-NEXT: vzeroupper
; AVX512F-X64-NEXT: retq
;
; AVX512F-X86-LABEL: TEST_mm_mask_testn_epi32_mask:
; AVX512F-X86: # %bb.0: # %entry
; AVX512F-X86-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
; AVX512F-X86-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
; AVX512F-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; AVX512F-X86-NEXT: kmovw %eax, %k1
; AVX512F-X86-NEXT: vptestnmd %zmm0, %zmm1, %k0 {%k1}
; AVX512F-X86-NEXT: kshiftlw $12, %k0, %k0
; AVX512F-X86-NEXT: kshiftrw $12, %k0, %k0
; AVX512F-X86-NEXT: kmovw %k0, %eax
; AVX512F-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X86-NEXT: vzeroupper
; AVX512F-X86-NEXT: retl
entry:
%and.i.i = and <2 x i64> %__B, %__A
%0 = bitcast <2 x i64> %and.i.i to <4 x i32>
@ -378,24 +569,51 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm256_mask_testn_epi64_mask(i8 %__U, <4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm256_mask_testn_epi64_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: kmovw %edi, %k1
; X86_64-NEXT: vptestnmq %ymm0, %ymm1, %k0 {%k1}
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: vzeroupper
; X86_64-NEXT: retq
; AVX512VL-X64-LABEL: TEST_mm256_mask_testn_epi64_mask:
; AVX512VL-X64: # %bb.0: # %entry
; AVX512VL-X64-NEXT: kmovw %edi, %k1
; AVX512VL-X64-NEXT: vptestnmq %ymm0, %ymm1, %k0 {%k1}
; AVX512VL-X64-NEXT: kmovw %k0, %eax
; AVX512VL-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X64-NEXT: vzeroupper
; AVX512VL-X64-NEXT: retq
;
; I386-LABEL: TEST_mm256_mask_testn_epi64_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; I386-NEXT: kmovw %eax, %k1
; I386-NEXT: vptestnmq %ymm0, %ymm1, %k0 {%k1}
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: vzeroupper
; I386-NEXT: retl
; AVX512VL-X86-LABEL: TEST_mm256_mask_testn_epi64_mask:
; AVX512VL-X86: # %bb.0: # %entry
; AVX512VL-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; AVX512VL-X86-NEXT: kmovw %eax, %k1
; AVX512VL-X86-NEXT: vptestnmq %ymm0, %ymm1, %k0 {%k1}
; AVX512VL-X86-NEXT: kmovw %k0, %eax
; AVX512VL-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X86-NEXT: vzeroupper
; AVX512VL-X86-NEXT: retl
;
; AVX512F-X64-LABEL: TEST_mm256_mask_testn_epi64_mask:
; AVX512F-X64: # %bb.0: # %entry
; AVX512F-X64-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512F-X64-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512F-X64-NEXT: kmovw %edi, %k1
; AVX512F-X64-NEXT: vptestnmq %zmm0, %zmm1, %k0 {%k1}
; AVX512F-X64-NEXT: kshiftlw $12, %k0, %k0
; AVX512F-X64-NEXT: kshiftrw $12, %k0, %k0
; AVX512F-X64-NEXT: kmovw %k0, %eax
; AVX512F-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X64-NEXT: vzeroupper
; AVX512F-X64-NEXT: retq
;
; AVX512F-X86-LABEL: TEST_mm256_mask_testn_epi64_mask:
; AVX512F-X86: # %bb.0: # %entry
; AVX512F-X86-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512F-X86-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512F-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
; AVX512F-X86-NEXT: kmovw %eax, %k1
; AVX512F-X86-NEXT: vptestnmq %zmm0, %zmm1, %k0 {%k1}
; AVX512F-X86-NEXT: kshiftlw $12, %k0, %k0
; AVX512F-X86-NEXT: kshiftrw $12, %k0, %k0
; AVX512F-X86-NEXT: kmovw %k0, %eax
; AVX512F-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X86-NEXT: vzeroupper
; AVX512F-X86-NEXT: retl
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = icmp eq <4 x i64> %and.i.i, zeroinitializer
@ -409,23 +627,45 @@ entry:
; Function Attrs: norecurse nounwind readnone
define zeroext i8 @TEST_mm256_mask_testn_epi32_mask(i8 %__U, <4 x i64> %__A, <4 x i64> %__B) local_unnamed_addr #0 {
; X86_64-LABEL: TEST_mm256_mask_testn_epi32_mask:
; X86_64: # %bb.0: # %entry
; X86_64-NEXT: vptestnmd %ymm0, %ymm1, %k0
; X86_64-NEXT: kmovw %k0, %eax
; X86_64-NEXT: andb %dil, %al
; X86_64-NEXT: # kill: def $al killed $al killed $eax
; X86_64-NEXT: vzeroupper
; X86_64-NEXT: retq
; AVX512VL-X64-LABEL: TEST_mm256_mask_testn_epi32_mask:
; AVX512VL-X64: # %bb.0: # %entry
; AVX512VL-X64-NEXT: vptestnmd %ymm0, %ymm1, %k0
; AVX512VL-X64-NEXT: kmovw %k0, %eax
; AVX512VL-X64-NEXT: andb %dil, %al
; AVX512VL-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X64-NEXT: vzeroupper
; AVX512VL-X64-NEXT: retq
;
; I386-LABEL: TEST_mm256_mask_testn_epi32_mask:
; I386: # %bb.0: # %entry
; I386-NEXT: vptestnmd %ymm0, %ymm1, %k0
; I386-NEXT: kmovw %k0, %eax
; I386-NEXT: andb {{[0-9]+}}(%esp), %al
; I386-NEXT: # kill: def $al killed $al killed $eax
; I386-NEXT: vzeroupper
; I386-NEXT: retl
; AVX512VL-X86-LABEL: TEST_mm256_mask_testn_epi32_mask:
; AVX512VL-X86: # %bb.0: # %entry
; AVX512VL-X86-NEXT: vptestnmd %ymm0, %ymm1, %k0
; AVX512VL-X86-NEXT: kmovw %k0, %eax
; AVX512VL-X86-NEXT: andb {{[0-9]+}}(%esp), %al
; AVX512VL-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512VL-X86-NEXT: vzeroupper
; AVX512VL-X86-NEXT: retl
;
; AVX512F-X64-LABEL: TEST_mm256_mask_testn_epi32_mask:
; AVX512F-X64: # %bb.0: # %entry
; AVX512F-X64-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512F-X64-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512F-X64-NEXT: vptestnmd %zmm0, %zmm1, %k0
; AVX512F-X64-NEXT: kmovw %k0, %eax
; AVX512F-X64-NEXT: andb %dil, %al
; AVX512F-X64-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X64-NEXT: vzeroupper
; AVX512F-X64-NEXT: retq
;
; AVX512F-X86-LABEL: TEST_mm256_mask_testn_epi32_mask:
; AVX512F-X86: # %bb.0: # %entry
; AVX512F-X86-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
; AVX512F-X86-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
; AVX512F-X86-NEXT: vptestnmd %zmm0, %zmm1, %k0
; AVX512F-X86-NEXT: kmovw %k0, %eax
; AVX512F-X86-NEXT: andb {{[0-9]+}}(%esp), %al
; AVX512F-X86-NEXT: # kill: def $al killed $al killed $eax
; AVX512F-X86-NEXT: vzeroupper
; AVX512F-X86-NEXT: retl
entry:
%and.i.i = and <4 x i64> %__B, %__A
%0 = bitcast <4 x i64> %and.i.i to <8 x i32>