; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefixes=SSE,SSE2
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefixes=SSE,SSE41
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=AVX512,AVX512BW
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512vl | FileCheck %s --check-prefixes=AVX512,AVX512VL
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1OR2,AVX1
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX1OR2,AVX2
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefixes=AVX,AVX512,AVX512F
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=AVX,AVX512,AVX512BW
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512vl | FileCheck %s --check-prefixes=AVX,AVX512,AVX512VL
;
; Truncate
; SSE-NEXT: sete %al
; SSE-NEXT: retq
;
-; AVX-LABEL: trunc_v2i64_v2i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpsllq $63, %xmm0, %xmm0
-; AVX-NEXT: vmovmskpd %xmm0, %eax
-; AVX-NEXT: cmpb $3, %al
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: trunc_v2i64_v2i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpsllq $63, %xmm0, %xmm0
+; AVX1OR2-NEXT: vmovmskpd %xmm0, %eax
+; AVX1OR2-NEXT: cmpb $3, %al
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: trunc_v2i64_v2i1:
; AVX512F: # %bb.0:
; SSE-NEXT: sete %al
; SSE-NEXT: retq
;
-; AVX-LABEL: trunc_v4i32_v4i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpslld $31, %xmm0, %xmm0
-; AVX-NEXT: vmovmskps %xmm0, %eax
-; AVX-NEXT: cmpb $15, %al
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: trunc_v4i32_v4i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpslld $31, %xmm0, %xmm0
+; AVX1OR2-NEXT: vmovmskps %xmm0, %eax
+; AVX1OR2-NEXT: cmpb $15, %al
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: trunc_v4i32_v4i1:
; AVX512F: # %bb.0:
; SSE-NEXT: sete %al
; SSE-NEXT: retq
;
-; AVX-LABEL: trunc_v8i16_v8i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpsllw $15, %xmm0, %xmm0
-; AVX-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
-; AVX-NEXT: vpmovmskb %xmm0, %eax
-; AVX-NEXT: cmpb $-1, %al
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: trunc_v8i16_v8i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpsllw $15, %xmm0, %xmm0
+; AVX1OR2-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
+; AVX1OR2-NEXT: vpmovmskb %xmm0, %eax
+; AVX1OR2-NEXT: cmpb $-1, %al
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: trunc_v8i16_v8i1:
; AVX512F: # %bb.0:
; AVX-NEXT: cmpw $-1, %ax
; AVX-NEXT: sete %al
; AVX-NEXT: retq
-;
-; AVX512-LABEL: trunc_v16i8_v16i1:
-; AVX512: # %bb.0:
-; AVX512-NEXT: vpsllw $7, %xmm0, %xmm0
-; AVX512-NEXT: vpmovmskb %xmm0, %eax
-; AVX512-NEXT: cmpw $-1, %ax
-; AVX512-NEXT: sete %al
-; AVX512-NEXT: retq
%a = trunc <16 x i8> %0 to <16 x i1>
%b = call i1 @llvm.vector.reduce.and.v16i1(<16 x i1> %a)
ret i1 %b
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp0_v2i64_v2i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vptest %xmm0, %xmm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp0_v2i64_v2i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vptest %xmm0, %xmm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp0_v2i64_v2i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp0_v4i32_v4i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vptest %xmm0, %xmm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp0_v4i32_v4i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vptest %xmm0, %xmm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp0_v4i32_v4i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp0_v8i16_v8i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vptest %xmm0, %xmm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp0_v8i16_v8i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vptest %xmm0, %xmm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp0_v8i16_v8i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp0_v16i8_v16i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vptest %xmm0, %xmm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp0_v16i8_v16i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vptest %xmm0, %xmm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp0_v16i8_v16i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp0_v4i64_v4i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vptest %ymm0, %ymm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: vzeroupper
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp0_v4i64_v4i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vptest %ymm0, %ymm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: vzeroupper
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp0_v4i64_v4i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp0_v8i32_v8i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vptest %ymm0, %ymm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: vzeroupper
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp0_v8i32_v8i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vptest %ymm0, %ymm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: vzeroupper
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp0_v8i32_v8i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp0_v16i16_v16i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vptest %ymm0, %ymm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: vzeroupper
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp0_v16i16_v16i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vptest %ymm0, %ymm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: vzeroupper
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp0_v16i16_v16i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp0_v32i8_v32i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vptest %ymm0, %ymm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: vzeroupper
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp0_v32i8_v32i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vptest %ymm0, %ymm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: vzeroupper
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp0_v32i8_v32i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp0_v8i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpmovzxbw {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
-; AVX-NEXT: vpsllw $15, %xmm0, %xmm0
-; AVX-NEXT: vpmovmskb %xmm0, %eax
-; AVX-NEXT: testl $43690, %eax # imm = 0xAAAA
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp0_v8i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpmovzxbw {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
+; AVX1OR2-NEXT: vpsllw $15, %xmm0, %xmm0
+; AVX1OR2-NEXT: vpmovmskb %xmm0, %eax
+; AVX1OR2-NEXT: testl $43690, %eax # imm = 0xAAAA
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp0_v8i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp1_v2i64_v2i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
-; AVX-NEXT: vpsubb %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vptest %xmm0, %xmm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp1_v2i64_v2i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
+; AVX1OR2-NEXT: vpsubb %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vptest %xmm0, %xmm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp1_v2i64_v2i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp1_v4i32_v4i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
-; AVX-NEXT: vpsubb %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vptest %xmm0, %xmm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp1_v4i32_v4i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
+; AVX1OR2-NEXT: vpsubb %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vptest %xmm0, %xmm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp1_v4i32_v4i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp1_v8i16_v8i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
-; AVX-NEXT: vpsubb %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vptest %xmm0, %xmm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp1_v8i16_v8i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
+; AVX1OR2-NEXT: vpsubb %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vptest %xmm0, %xmm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp1_v8i16_v8i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp1_v16i8_v16i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
-; AVX-NEXT: vpsubb %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vptest %xmm0, %xmm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp1_v16i8_v16i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1
+; AVX1OR2-NEXT: vpsubb %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vptest %xmm0, %xmm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp1_v16i8_v16i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp1_v8i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpmovzxbw {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
-; AVX-NEXT: vpsllw $15, %xmm0, %xmm0
-; AVX-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
-; AVX-NEXT: vpmovmskb %xmm0, %eax
-; AVX-NEXT: cmpb $-1, %al
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp1_v8i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpmovzxbw {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
+; AVX1OR2-NEXT: vpsllw $15, %xmm0, %xmm0
+; AVX1OR2-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
+; AVX1OR2-NEXT: vpmovmskb %xmm0, %eax
+; AVX1OR2-NEXT: cmpb $-1, %al
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp1_v8i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp_v2i64_v2i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpsubb %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vptest %xmm0, %xmm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp_v2i64_v2i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpsubb %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vptest %xmm0, %xmm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp_v2i64_v2i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp_v4i32_v4i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpsubb %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vptest %xmm0, %xmm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp_v4i32_v4i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpsubb %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vptest %xmm0, %xmm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp_v4i32_v4i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp_v8i16_v8i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpsubb %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vptest %xmm0, %xmm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp_v8i16_v8i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpsubb %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vptest %xmm0, %xmm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp_v8i16_v8i1:
; AVX512F: # %bb.0:
; SSE41-NEXT: sete %al
; SSE41-NEXT: retq
;
-; AVX-LABEL: icmp_v16i8_v16i1:
-; AVX: # %bb.0:
-; AVX-NEXT: vpsubb %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vptest %xmm0, %xmm0
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: icmp_v16i8_v16i1:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpsubb %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vptest %xmm0, %xmm0
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512F-LABEL: icmp_v16i8_v16i1:
; AVX512F: # %bb.0: