diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp --- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp +++ b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp @@ -1128,6 +1128,9 @@ {TTI::SK_PermuteTwoSrc, MVT::v16i16, 2}, // vpermt2w {TTI::SK_PermuteTwoSrc, MVT::v8i16, 2}, // vpermt2w {TTI::SK_PermuteTwoSrc, MVT::v64i8, 19}, // 6 * v32i8 + 1 + + {TTI::SK_Select, MVT::v32i16, 1}, // vblendmw + {TTI::SK_Select, MVT::v64i8, 1}, // vblendmb }; if (ST->hasBWI()) @@ -1181,6 +1184,11 @@ {TTI::SK_PermuteSingleSrc, MVT::v64i8, 14}, {TTI::SK_PermuteTwoSrc, MVT::v32i16, 42}, {TTI::SK_PermuteTwoSrc, MVT::v64i8, 42}, + + {TTI::SK_Select, MVT::v8f64, 1}, // vblendmpd + {TTI::SK_Select, MVT::v16f32, 1}, // vblendmps + {TTI::SK_Select, MVT::v8i64, 1}, // vblendmq + {TTI::SK_Select, MVT::v16i32, 1}, // vblendmd }; if (ST->hasAVX512()) diff --git a/llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector.ll b/llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector.ll --- a/llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector.ll +++ b/llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector.ll @@ -51,11 +51,11 @@ ; AVX512-NEXT: Cost Model: Unknown cost for instruction: %src256_512 = shufflevector <4 x double> %src256, <4 x double> undef, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V256_01 = shufflevector <4 x double> %src256, <4 x double> %src128_256, <4 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V256_23 = shufflevector <4 x double> %src256, <4 x double> %src128_256, <4 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V512_01 = shufflevector <8 x double> %src512, <8 x double> %src128_512, <8 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_01 = shufflevector <8 x double> %src512, <8 x double> %src128_512, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_23 = shufflevector <8 x double> %src512, <8 x double> %src128_512, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_45 = shufflevector <8 x double> %src512, <8 x double> %src128_512, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_67 = shufflevector <8 x double> %src512, <8 x double> %src128_512, <8 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V512_0123 = shufflevector <8 x double> %src512, <8 x double> %src256_512, <8 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_0123 = shufflevector <8 x double> %src512, <8 x double> %src256_512, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_4567 = shufflevector <8 x double> %src512, <8 x double> %src256_512, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; @@ -109,11 +109,11 @@ ; AVX512-NEXT: Cost Model: Unknown cost for instruction: %src256_512 = shufflevector <4 x i64> %src256, <4 x i64> undef, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V256_01 = shufflevector <4 x i64> %src256, <4 x i64> %src128_256, <4 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V256_23 = shufflevector <4 x i64> %src256, <4 x i64> %src128_256, <4 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %V512_01 = shufflevector <8 x i64> %src512, <8 x i64> %src128_512, <8 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_01 = shufflevector <8 x i64> %src512, <8 x i64> %src128_512, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_23 = shufflevector <8 x i64> %src512, <8 x i64> %src128_512, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_45 = shufflevector <8 x i64> %src512, <8 x i64> %src128_512, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_67 = shufflevector <8 x i64> %src512, <8 x i64> %src128_512, <8 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %V512_0123 = shufflevector <8 x i64> %src512, <8 x i64> %src256_512, <8 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_0123 = shufflevector <8 x i64> %src512, <8 x i64> %src256_512, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_4567 = shufflevector <8 x i64> %src512, <8 x i64> %src256_512, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; @@ -303,7 +303,7 @@ ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V256_67 = shufflevector <8 x float> %src256, <8 x float> %src64_256, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V256_0123 = shufflevector <8 x float> %src256, <8 x float> %src128_256, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V256_4567 = shufflevector <8 x float> %src256, <8 x float> %src128_256, <8 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %V512_01 = shufflevector <16 x float> %src512, <16 x float> %src64_512, <16 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_01 = shufflevector <16 x float> %src512, <16 x float> %src64_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_23 = shufflevector <16 x float> %src512, <16 x float> %src64_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_45 = shufflevector <16 x float> %src512, <16 x float> %src64_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_67 = shufflevector <16 x float> %src512, <16 x float> %src64_512, <16 x i32> @@ -311,11 +311,11 @@ ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_AB = shufflevector <16 x float> %src512, <16 x float> %src64_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_CD = shufflevector <16 x float> %src512, <16 x float> %src64_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_EF = shufflevector <16 x float> %src512, <16 x float> %src64_512, <16 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %V512_0123 = shufflevector <16 x float> %src512, <16 x float> %src128_512, <16 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_0123 = shufflevector <16 x float> %src512, <16 x float> %src128_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_4567 = shufflevector <16 x float> %src512, <16 x float> %src128_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_89AB = shufflevector <16 x float> %src512, <16 x float> %src128_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_CDEF = shufflevector <16 x float> %src512, <16 x float> %src128_512, <16 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %V512_01234567 = shufflevector <16 x float> %src512, <16 x float> %src128_512, <16 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_01234567 = shufflevector <16 x float> %src512, <16 x float> %src128_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_89ABCDEF = shufflevector <16 x float> %src512, <16 x float> %src128_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; @@ -555,7 +555,7 @@ ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V256_67 = shufflevector <8 x i32> %src256, <8 x i32> %src64_256, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V256_0123 = shufflevector <8 x i32> %src256, <8 x i32> %src128_256, <8 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V256_4567 = shufflevector <8 x i32> %src256, <8 x i32> %src128_256, <8 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %V512_01 = shufflevector <16 x i32> %src512, <16 x i32> %src64_512, <16 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_01 = shufflevector <16 x i32> %src512, <16 x i32> %src64_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_23 = shufflevector <16 x i32> %src512, <16 x i32> %src64_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_45 = shufflevector <16 x i32> %src512, <16 x i32> %src64_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_67 = shufflevector <16 x i32> %src512, <16 x i32> %src64_512, <16 x i32> @@ -563,11 +563,11 @@ ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_AB = shufflevector <16 x i32> %src512, <16 x i32> %src64_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_CD = shufflevector <16 x i32> %src512, <16 x i32> %src64_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_EF = shufflevector <16 x i32> %src512, <16 x i32> %src64_512, <16 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %V512_0123 = shufflevector <16 x i32> %src512, <16 x i32> %src128_512, <16 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_0123 = shufflevector <16 x i32> %src512, <16 x i32> %src128_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_4567 = shufflevector <16 x i32> %src512, <16 x i32> %src128_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_89AB = shufflevector <16 x i32> %src512, <16 x i32> %src128_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_CDEF = shufflevector <16 x i32> %src512, <16 x i32> %src128_512, <16 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %V512_01234567 = shufflevector <16 x i32> %src512, <16 x i32> %src128_512, <16 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_01234567 = shufflevector <16 x i32> %src512, <16 x i32> %src128_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V512_89ABCDEF = shufflevector <16 x i32> %src512, <16 x i32> %src128_512, <16 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; diff --git a/llvm/test/Analysis/CostModel/X86/vselect-cost.ll b/llvm/test/Analysis/CostModel/X86/vselect-cost.ll --- a/llvm/test/Analysis/CostModel/X86/vselect-cost.ll +++ b/llvm/test/Analysis/CostModel/X86/vselect-cost.ll @@ -355,3 +355,160 @@ ret <32 x i8> %sel } +define <8 x i64> @test_8i64(<8 x i64> %a, <8 x i64> %b) { +; SSE2-LABEL: 'test_8i64' +; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %sel = select <8 x i1> , <8 x i64> %a, <8 x i64> %b +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %sel +; +; SSE41-LABEL: 'test_8i64' +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %sel = select <8 x i1> , <8 x i64> %a, <8 x i64> %b +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %sel +; +; AVX1-LABEL: 'test_8i64' +; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <8 x i1> , <8 x i64> %a, <8 x i64> %b +; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %sel +; +; AVX2-LABEL: 'test_8i64' +; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <8 x i1> , <8 x i64> %a, <8 x i64> %b +; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %sel +; +; AVX512-LABEL: 'test_8i64' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <8 x i1> , <8 x i64> %a, <8 x i64> %b +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %sel +; + %sel = select <8 x i1> , <8 x i64> %a, <8 x i64> %b + ret <8 x i64> %sel +} + +define <8 x double> @test_8double(<8 x double> %a, <8 x double> %b) { +; SSE2-LABEL: 'test_8double' +; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %sel = select <8 x i1> , <8 x double> %a, <8 x double> %b +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x double> %sel +; +; SSE41-LABEL: 'test_8double' +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %sel = select <8 x i1> , <8 x double> %a, <8 x double> %b +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x double> %sel +; +; AVX1-LABEL: 'test_8double' +; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <8 x i1> , <8 x double> %a, <8 x double> %b +; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x double> %sel +; +; AVX2-LABEL: 'test_8double' +; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <8 x i1> , <8 x double> %a, <8 x double> %b +; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x double> %sel +; +; AVX512-LABEL: 'test_8double' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <8 x i1> , <8 x double> %a, <8 x double> %b +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x double> %sel +; + %sel = select <8 x i1> , <8 x double> %a, <8 x double> %b + ret <8 x double> %sel +} + +define <16 x i32> @test_16i32(<16 x i32> %a, <16 x i32> %b) { +; SSE2-LABEL: 'test_16i32' +; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %sel = select <16 x i1> , <16 x i32> %a, <16 x i32> %b +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %sel +; +; SSE41-LABEL: 'test_16i32' +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %sel = select <16 x i1> , <16 x i32> %a, <16 x i32> %b +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %sel +; +; AVX1-LABEL: 'test_16i32' +; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <16 x i1> , <16 x i32> %a, <16 x i32> %b +; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %sel +; +; AVX2-LABEL: 'test_16i32' +; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <16 x i1> , <16 x i32> %a, <16 x i32> %b +; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %sel +; +; AVX512-LABEL: 'test_16i32' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <16 x i1> , <16 x i32> %a, <16 x i32> %b +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %sel +; + %sel = select <16 x i1> , <16 x i32> %a, <16 x i32> %b + ret <16 x i32> %sel +} + +define <16 x float> @test_16float(<16 x float> %a, <16 x float> %b) { +; SSE2-LABEL: 'test_16float' +; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %sel = select <16 x i1> , <16 x float> %a, <16 x float> %b +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x float> %sel +; +; SSE41-LABEL: 'test_16float' +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %sel = select <16 x i1> , <16 x float> %a, <16 x float> %b +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x float> %sel +; +; AVX1-LABEL: 'test_16float' +; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <16 x i1> , <16 x float> %a, <16 x float> %b +; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x float> %sel +; +; AVX2-LABEL: 'test_16float' +; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <16 x i1> , <16 x float> %a, <16 x float> %b +; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x float> %sel +; +; AVX512-LABEL: 'test_16float' +; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <16 x i1> , <16 x float> %a, <16 x float> %b +; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x float> %sel +; + %sel = select <16 x i1> , <16 x float> %a, <16 x float> %b + ret <16 x float> %sel +} + +define <32 x i16> @test_32i16(<32 x i16> %a, <32 x i16> %b) { +; SSE2-LABEL: 'test_32i16' +; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %sel = select <32 x i1> , <32 x i16> %a, <32 x i16> %b +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %sel +; +; SSE41-LABEL: 'test_32i16' +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %sel = select <32 x i1> , <32 x i16> %a, <32 x i16> %b +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %sel +; +; AVX1-LABEL: 'test_32i16' +; AVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %sel = select <32 x i1> , <32 x i16> %a, <32 x i16> %b +; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %sel +; +; AVX2-LABEL: 'test_32i16' +; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <32 x i1> , <32 x i16> %a, <32 x i16> %b +; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %sel +; +; AVX512F-LABEL: 'test_32i16' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <32 x i1> , <32 x i16> %a, <32 x i16> %b +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %sel +; +; AVX512BW-LABEL: 'test_32i16' +; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <32 x i1> , <32 x i16> %a, <32 x i16> %b +; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %sel +; + %sel = select <32 x i1> , <32 x i16> %a, <32 x i16> %b + ret <32 x i16> %sel +} + +define <64 x i8> @test_64i8(<64 x i8> %a, <64 x i8> %b) { +; SSE2-LABEL: 'test_64i8' +; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %sel = select <64 x i1> , <64 x i8> %a, <64 x i8> %b +; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %sel +; +; SSE41-LABEL: 'test_64i8' +; SSE41-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %sel = select <64 x i1> , <64 x i8> %a, <64 x i8> %b +; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %sel +; +; AVX1-LABEL: 'test_64i8' +; AVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %sel = select <64 x i1> , <64 x i8> %a, <64 x i8> %b +; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %sel +; +; AVX2-LABEL: 'test_64i8' +; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <64 x i1> , <64 x i8> %a, <64 x i8> %b +; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %sel +; +; AVX512F-LABEL: 'test_64i8' +; AVX512F-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <64 x i1> , <64 x i8> %a, <64 x i8> %b +; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %sel +; +; AVX512BW-LABEL: 'test_64i8' +; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <64 x i1> , <64 x i8> %a, <64 x i8> %b +; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %sel +; + %sel = select <64 x i1> , <64 x i8> %a, <64 x i8> %b + ret <64 x i8> %sel +}