; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse2 | FileCheck %s --check-prefixes=SSE,SSE2
; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse4.2 | FileCheck %s --check-prefixes=SSE,SSE42
-; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1
-; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2
-; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx512f,+avx512bw,+avx512vl | FileCheck %s --check-prefixes=AVX512
+; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1OR2,AVX1
+; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX1OR2,AVX2
+; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx512f,+avx512bw,+avx512vl | FileCheck %s --check-prefixes=AVX,AVX512
define i64 @test_v2f64_sext(<2 x double> %a0, <2 x double> %a1) {
; SSE-LABEL: test_v2f64_sext:
; AVX-NEXT: sete %al
; AVX-NEXT: negq %rax
; AVX-NEXT: retq
-;
-; AVX512-LABEL: test_v2f64_sext:
-; AVX512: # %bb.0:
-; AVX512-NEXT: vcmpltpd %xmm0, %xmm1, %xmm0
-; AVX512-NEXT: vmovmskpd %xmm0, %ecx
-; AVX512-NEXT: xorl %eax, %eax
-; AVX512-NEXT: cmpl $3, %ecx
-; AVX512-NEXT: sete %al
-; AVX512-NEXT: negq %rax
-; AVX512-NEXT: retq
%c = fcmp ogt <2 x double> %a0, %a1
%s = sext <2 x i1> %c to <2 x i64>
%1 = shufflevector <2 x i64> %s, <2 x i64> undef, <2 x i32> <i32 1, i32 undef>
; AVX-NEXT: negq %rax
; AVX-NEXT: vzeroupper
; AVX-NEXT: retq
-;
-; AVX512-LABEL: test_v4f64_sext:
-; AVX512: # %bb.0:
-; AVX512-NEXT: vcmpltpd %ymm0, %ymm1, %ymm0
-; AVX512-NEXT: vmovmskpd %ymm0, %ecx
-; AVX512-NEXT: xorl %eax, %eax
-; AVX512-NEXT: cmpl $15, %ecx
-; AVX512-NEXT: sete %al
-; AVX512-NEXT: negq %rax
-; AVX512-NEXT: vzeroupper
-; AVX512-NEXT: retq
%c = fcmp ogt <4 x double> %a0, %a1
%s = sext <4 x i1> %c to <4 x i64>
%1 = shufflevector <4 x i64> %s, <4 x i64> undef, <4 x i32> <i32 2, i32 3, i32 undef, i32 undef>
; SSE-NEXT: negq %rax
; SSE-NEXT: retq
;
-; AVX-LABEL: test_v4f64_legal_sext:
-; AVX: # %bb.0:
-; AVX-NEXT: vcmpltpd %ymm0, %ymm1, %ymm0
-; AVX-NEXT: vextractf128 $1, %ymm0, %xmm1
-; AVX-NEXT: vpackssdw %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vmovmskps %xmm0, %ecx
-; AVX-NEXT: xorl %eax, %eax
-; AVX-NEXT: cmpl $15, %ecx
-; AVX-NEXT: sete %al
-; AVX-NEXT: negq %rax
-; AVX-NEXT: vzeroupper
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: test_v4f64_legal_sext:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vcmpltpd %ymm0, %ymm1, %ymm0
+; AVX1OR2-NEXT: vextractf128 $1, %ymm0, %xmm1
+; AVX1OR2-NEXT: vpackssdw %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vmovmskps %xmm0, %ecx
+; AVX1OR2-NEXT: xorl %eax, %eax
+; AVX1OR2-NEXT: cmpl $15, %ecx
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: negq %rax
+; AVX1OR2-NEXT: vzeroupper
+; AVX1OR2-NEXT: retq
;
; AVX512-LABEL: test_v4f64_legal_sext:
; AVX512: # %bb.0:
; AVX-NEXT: sete %al
; AVX-NEXT: negl %eax
; AVX-NEXT: retq
-;
-; AVX512-LABEL: test_v4f32_sext:
-; AVX512: # %bb.0:
-; AVX512-NEXT: vcmpltps %xmm0, %xmm1, %xmm0
-; AVX512-NEXT: vmovmskps %xmm0, %ecx
-; AVX512-NEXT: xorl %eax, %eax
-; AVX512-NEXT: cmpl $15, %ecx
-; AVX512-NEXT: sete %al
-; AVX512-NEXT: negl %eax
-; AVX512-NEXT: retq
%c = fcmp ogt <4 x float> %a0, %a1
%s = sext <4 x i1> %c to <4 x i32>
%1 = shufflevector <4 x i32> %s, <4 x i32> undef, <4 x i32> <i32 2, i32 3, i32 undef, i32 undef>
; AVX-NEXT: negl %eax
; AVX-NEXT: vzeroupper
; AVX-NEXT: retq
-;
-; AVX512-LABEL: test_v8f32_sext:
-; AVX512: # %bb.0:
-; AVX512-NEXT: vcmpltps %ymm0, %ymm1, %ymm0
-; AVX512-NEXT: vmovmskps %ymm0, %ecx
-; AVX512-NEXT: xorl %eax, %eax
-; AVX512-NEXT: cmpl $255, %ecx
-; AVX512-NEXT: sete %al
-; AVX512-NEXT: negl %eax
-; AVX512-NEXT: vzeroupper
-; AVX512-NEXT: retq
%c = fcmp ogt <8 x float> %a0, %a1
%s = sext <8 x i1> %c to <8 x i32>
%1 = shufflevector <8 x i32> %s, <8 x i32> undef, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef>
; SSE-NEXT: negl %eax
; SSE-NEXT: retq
;
-; AVX-LABEL: test_v8f32_legal_sext:
-; AVX: # %bb.0:
-; AVX-NEXT: vcmpltps %ymm0, %ymm1, %ymm0
-; AVX-NEXT: vextractf128 $1, %ymm0, %xmm1
-; AVX-NEXT: vpackssdw %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vpmovmskb %xmm0, %ecx
-; AVX-NEXT: xorl %eax, %eax
-; AVX-NEXT: cmpl $65535, %ecx # imm = 0xFFFF
-; AVX-NEXT: sete %al
-; AVX-NEXT: negl %eax
-; AVX-NEXT: vzeroupper
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: test_v8f32_legal_sext:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vcmpltps %ymm0, %ymm1, %ymm0
+; AVX1OR2-NEXT: vextractf128 $1, %ymm0, %xmm1
+; AVX1OR2-NEXT: vpackssdw %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vpmovmskb %xmm0, %ecx
+; AVX1OR2-NEXT: xorl %eax, %eax
+; AVX1OR2-NEXT: cmpl $65535, %ecx # imm = 0xFFFF
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: negl %eax
+; AVX1OR2-NEXT: vzeroupper
+; AVX1OR2-NEXT: retq
;
; AVX512-LABEL: test_v8f32_legal_sext:
; AVX512: # %bb.0:
; AVX-NEXT: sete %al
; AVX-NEXT: negq %rax
; AVX-NEXT: retq
-;
-; AVX512-LABEL: test_v2i64_sext:
-; AVX512: # %bb.0:
-; AVX512-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
-; AVX512-NEXT: vmovmskpd %xmm0, %ecx
-; AVX512-NEXT: xorl %eax, %eax
-; AVX512-NEXT: cmpl $3, %ecx
-; AVX512-NEXT: sete %al
-; AVX512-NEXT: negq %rax
-; AVX512-NEXT: retq
%c = icmp sgt <2 x i64> %a0, %a1
%s = sext <2 x i1> %c to <2 x i64>
%1 = shufflevector <2 x i64> %s, <2 x i64> undef, <2 x i32> <i32 1, i32 undef>
; AVX-NEXT: sete %al
; AVX-NEXT: negl %eax
; AVX-NEXT: retq
-;
-; AVX512-LABEL: test_v4i32_sext:
-; AVX512: # %bb.0:
-; AVX512-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
-; AVX512-NEXT: vmovmskps %xmm0, %ecx
-; AVX512-NEXT: xorl %eax, %eax
-; AVX512-NEXT: cmpl $15, %ecx
-; AVX512-NEXT: sete %al
-; AVX512-NEXT: negl %eax
-; AVX512-NEXT: retq
%c = icmp sgt <4 x i32> %a0, %a1
%s = sext <4 x i1> %c to <4 x i32>
%1 = shufflevector <4 x i32> %s, <4 x i32> undef, <4 x i32> <i32 2, i32 3, i32 undef, i32 undef>
; AVX-NEXT: negl %eax
; AVX-NEXT: # kill: def $ax killed $ax killed $eax
; AVX-NEXT: retq
-;
-; AVX512-LABEL: test_v8i16_sext:
-; AVX512: # %bb.0:
-; AVX512-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
-; AVX512-NEXT: vpmovmskb %xmm0, %ecx
-; AVX512-NEXT: xorl %eax, %eax
-; AVX512-NEXT: cmpl $65535, %ecx # imm = 0xFFFF
-; AVX512-NEXT: sete %al
-; AVX512-NEXT: negl %eax
-; AVX512-NEXT: # kill: def $ax killed $ax killed $eax
-; AVX512-NEXT: retq
%c = icmp sgt <8 x i16> %a0, %a1
%s = sext <8 x i1> %c to <8 x i16>
%1 = shufflevector <8 x i16> %s, <8 x i16> undef, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef>
; AVX-NEXT: sete %al
; AVX-NEXT: negb %al
; AVX-NEXT: retq
-;
-; AVX512-LABEL: test_v16i8_sext:
-; AVX512: # %bb.0:
-; AVX512-NEXT: vpcmpgtb %xmm1, %xmm0, %xmm0
-; AVX512-NEXT: vpmovmskb %xmm0, %eax
-; AVX512-NEXT: cmpl $65535, %eax # imm = 0xFFFF
-; AVX512-NEXT: sete %al
-; AVX512-NEXT: negb %al
-; AVX512-NEXT: retq
%c = icmp sgt <16 x i8> %a0, %a1
%s = sext <16 x i1> %c to <16 x i8>
%1 = shufflevector <16 x i8> %s, <16 x i8> undef, <16 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
; SSE-NEXT: sete %al
; SSE-NEXT: retq
;
-; AVX-LABEL: bool_reduction_v2f64:
-; AVX: # %bb.0:
-; AVX-NEXT: vcmpltpd %xmm0, %xmm1, %xmm0
-; AVX-NEXT: vmovmskpd %xmm0, %eax
-; AVX-NEXT: cmpb $3, %al
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: bool_reduction_v2f64:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vcmpltpd %xmm0, %xmm1, %xmm0
+; AVX1OR2-NEXT: vmovmskpd %xmm0, %eax
+; AVX1OR2-NEXT: cmpb $3, %al
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512-LABEL: bool_reduction_v2f64:
; AVX512: # %bb.0:
; SSE-NEXT: sete %al
; SSE-NEXT: retq
;
-; AVX-LABEL: bool_reduction_v4f32:
-; AVX: # %bb.0:
-; AVX-NEXT: vcmpeqps %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vmovmskps %xmm0, %eax
-; AVX-NEXT: cmpb $15, %al
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: bool_reduction_v4f32:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vcmpeqps %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vmovmskps %xmm0, %eax
+; AVX1OR2-NEXT: cmpb $15, %al
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512-LABEL: bool_reduction_v4f32:
; AVX512: # %bb.0:
; SSE-NEXT: sete %al
; SSE-NEXT: retq
;
-; AVX-LABEL: bool_reduction_v4f64:
-; AVX: # %bb.0:
-; AVX-NEXT: vcmplepd %ymm0, %ymm1, %ymm0
-; AVX-NEXT: vmovmskpd %ymm0, %eax
-; AVX-NEXT: cmpb $15, %al
-; AVX-NEXT: sete %al
-; AVX-NEXT: vzeroupper
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: bool_reduction_v4f64:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vcmplepd %ymm0, %ymm1, %ymm0
+; AVX1OR2-NEXT: vmovmskpd %ymm0, %eax
+; AVX1OR2-NEXT: cmpb $15, %al
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: vzeroupper
+; AVX1OR2-NEXT: retq
;
; AVX512-LABEL: bool_reduction_v4f64:
; AVX512: # %bb.0:
; SSE-NEXT: sete %al
; SSE-NEXT: retq
;
-; AVX-LABEL: bool_reduction_v8f32:
-; AVX: # %bb.0:
-; AVX-NEXT: vcmpneqps %ymm1, %ymm0, %ymm0
-; AVX-NEXT: vmovmskps %ymm0, %eax
-; AVX-NEXT: cmpb $-1, %al
-; AVX-NEXT: sete %al
-; AVX-NEXT: vzeroupper
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: bool_reduction_v8f32:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vcmpneqps %ymm1, %ymm0, %ymm0
+; AVX1OR2-NEXT: vmovmskps %ymm0, %eax
+; AVX1OR2-NEXT: cmpb $-1, %al
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: vzeroupper
+; AVX1OR2-NEXT: retq
;
; AVX512-LABEL: bool_reduction_v8f32:
; AVX512: # %bb.0:
; SSE42-NEXT: sete %al
; SSE42-NEXT: retq
;
-; AVX-LABEL: bool_reduction_v2i64:
-; AVX: # %bb.0:
-; AVX-NEXT: vpcmpeqq %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vmovmskpd %xmm0, %eax
-; AVX-NEXT: xorl $3, %eax
-; AVX-NEXT: cmpb $3, %al
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: bool_reduction_v2i64:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpcmpeqq %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vmovmskpd %xmm0, %eax
+; AVX1OR2-NEXT: xorl $3, %eax
+; AVX1OR2-NEXT: cmpb $3, %al
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512-LABEL: bool_reduction_v2i64:
; AVX512: # %bb.0:
; SSE42-NEXT: sete %al
; SSE42-NEXT: retq
;
-; AVX-LABEL: bool_reduction_v4i32:
-; AVX: # %bb.0:
-; AVX-NEXT: vpminud %xmm1, %xmm0, %xmm1
-; AVX-NEXT: vpcmpeqd %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vmovmskps %xmm0, %eax
-; AVX-NEXT: xorl $15, %eax
-; AVX-NEXT: cmpb $15, %al
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: bool_reduction_v4i32:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpminud %xmm1, %xmm0, %xmm1
+; AVX1OR2-NEXT: vpcmpeqd %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vmovmskps %xmm0, %eax
+; AVX1OR2-NEXT: xorl $15, %eax
+; AVX1OR2-NEXT: cmpb $15, %al
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512-LABEL: bool_reduction_v4i32:
; AVX512: # %bb.0:
; SSE-NEXT: sete %al
; SSE-NEXT: retq
;
-; AVX-LABEL: bool_reduction_v8i16:
-; AVX: # %bb.0:
-; AVX-NEXT: vpcmpgtw %xmm0, %xmm1, %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: bool_reduction_v8i16:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
+; AVX1OR2-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
+; AVX1OR2-NEXT: vpmovmskb %xmm0, %eax
+; AVX1OR2-NEXT: cmpb $-1, %al
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512-LABEL: bool_reduction_v8i16:
; AVX512: # %bb.0:
; SSE-NEXT: sete %al
; SSE-NEXT: retq
;
-; AVX-LABEL: bool_reduction_v16i8:
-; AVX: # %bb.0:
-; AVX-NEXT: vpcmpgtb %xmm1, %xmm0, %xmm0
-; AVX-NEXT: vpmovmskb %xmm0, %eax
-; AVX-NEXT: cmpw $-1, %ax
-; AVX-NEXT: sete %al
-; AVX-NEXT: retq
+; AVX1OR2-LABEL: bool_reduction_v16i8:
+; AVX1OR2: # %bb.0:
+; AVX1OR2-NEXT: vpcmpgtb %xmm1, %xmm0, %xmm0
+; AVX1OR2-NEXT: vpmovmskb %xmm0, %eax
+; AVX1OR2-NEXT: cmpw $-1, %ax
+; AVX1OR2-NEXT: sete %al
+; AVX1OR2-NEXT: retq
;
; AVX512-LABEL: bool_reduction_v16i8:
; AVX512: # %bb.0: