1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py 2; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mtriple=x86_64-- -mattr=+sse2 | FileCheck %s -check-prefixes=SSE2 3; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mtriple=x86_64-- -mattr=+sse4.1 | FileCheck %s -check-prefixes=SSE4 4; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mtriple=x86_64-- -mattr=+avx | FileCheck %s -check-prefixes=AVX,AVX1 5; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mtriple=x86_64-- -mattr=+avx2 | FileCheck %s -check-prefixes=AVX,AVX2 6; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mtriple=x86_64-- -mattr=+avx512f,+avx512vl | FileCheck %s -check-prefixes=AVX512,AVX512F 7; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mtriple=x86_64-- -mattr=+avx512bw,+avx512vl | FileCheck %s -check-prefixes=AVX512,AVX512BW 8; 9; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mtriple=x86_64-- -mcpu=slm | FileCheck %s --check-prefixes=SSE4 10; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mtriple=x86_64-- -mcpu=goldmont | FileCheck %s --check-prefixes=SSE4 11; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mtriple=x86_64-- -mcpu=btver2 | FileCheck %s --check-prefixes=AVX,AVX1 12 13; Verify the cost of vector select instructions. 14 15define i32 @test_select() { 16; SSE2-LABEL: 'test_select' 17; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = select i1 undef, i64 undef, i64 undef 18; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef 19; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef 20; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef 21; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = select i1 undef, i32 undef, i32 undef 22; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef 23; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef 24; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef 25; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = select i1 undef, i16 undef, i16 undef 26; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef 27; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef 28; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef 29; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = select i1 undef, i8 undef, i8 undef 30; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef 31; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef 32; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef 33; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef 34; 35; SSE4-LABEL: 'test_select' 36; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = select i1 undef, i64 undef, i64 undef 37; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef 38; SSE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef 39; SSE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef 40; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = select i1 undef, i32 undef, i32 undef 41; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef 42; SSE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef 43; SSE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef 44; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = select i1 undef, i16 undef, i16 undef 45; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef 46; SSE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef 47; SSE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef 48; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = select i1 undef, i8 undef, i8 undef 49; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef 50; SSE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef 51; SSE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef 52; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef 53; 54; AVX1-LABEL: 'test_select' 55; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = select i1 undef, i64 undef, i64 undef 56; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef 57; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef 58; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef 59; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = select i1 undef, i32 undef, i32 undef 60; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef 61; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef 62; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef 63; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = select i1 undef, i16 undef, i16 undef 64; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef 65; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef 66; AVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef 67; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = select i1 undef, i8 undef, i8 undef 68; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef 69; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef 70; AVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef 71; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef 72; 73; AVX2-LABEL: 'test_select' 74; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = select i1 undef, i64 undef, i64 undef 75; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef 76; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef 77; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef 78; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = select i1 undef, i32 undef, i32 undef 79; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef 80; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef 81; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef 82; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = select i1 undef, i16 undef, i16 undef 83; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef 84; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef 85; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef 86; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = select i1 undef, i8 undef, i8 undef 87; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef 88; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef 89; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef 90; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef 91; 92; AVX512F-LABEL: 'test_select' 93; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = select i1 undef, i64 undef, i64 undef 94; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef 95; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef 96; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef 97; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = select i1 undef, i32 undef, i32 undef 98; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef 99; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef 100; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef 101; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = select i1 undef, i16 undef, i16 undef 102; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef 103; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef 104; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef 105; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = select i1 undef, i8 undef, i8 undef 106; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef 107; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef 108; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef 109; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef 110; 111; AVX512BW-LABEL: 'test_select' 112; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = select i1 undef, i64 undef, i64 undef 113; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef 114; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef 115; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef 116; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = select i1 undef, i32 undef, i32 undef 117; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef 118; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef 119; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef 120; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = select i1 undef, i16 undef, i16 undef 121; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef 122; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef 123; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef 124; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = select i1 undef, i8 undef, i8 undef 125; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef 126; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef 127; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef 128; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef 129; 130 %I64 = select i1 undef, i64 undef, i64 undef 131 %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef 132 %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef 133 %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef 134 135 %I32 = select i1 undef, i32 undef, i32 undef 136 %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef 137 %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef 138 %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef 139 140 %I16 = select i1 undef, i16 undef, i16 undef 141 %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef 142 %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef 143 %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef 144 145 %I8 = select i1 undef, i8 undef, i8 undef 146 %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef 147 %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef 148 %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef 149 150 ret i32 undef 151} 152 153define i32 @test_select_fp() { 154; SSE2-LABEL: 'test_select_fp' 155; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %F64 = select i1 undef, double undef, double undef 156; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2F64 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef 157; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V4F64 = select <4 x i1> undef, <4 x double> undef, <4 x double> undef 158; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V8F64 = select <8 x i1> undef, <8 x double> undef, <8 x double> undef 159; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %F32 = select i1 undef, float undef, float undef 160; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4F32 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef 161; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V8F32 = select <8 x i1> undef, <8 x float> undef, <8 x float> undef 162; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V16F32 = select <16 x i1> undef, <16 x float> undef, <16 x float> undef 163; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef 164; 165; SSE4-LABEL: 'test_select_fp' 166; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %F64 = select i1 undef, double undef, double undef 167; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2F64 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef 168; SSE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4F64 = select <4 x i1> undef, <4 x double> undef, <4 x double> undef 169; SSE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8F64 = select <8 x i1> undef, <8 x double> undef, <8 x double> undef 170; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %F32 = select i1 undef, float undef, float undef 171; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4F32 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef 172; SSE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8F32 = select <8 x i1> undef, <8 x float> undef, <8 x float> undef 173; SSE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16F32 = select <16 x i1> undef, <16 x float> undef, <16 x float> undef 174; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef 175; 176; AVX-LABEL: 'test_select_fp' 177; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %F64 = select i1 undef, double undef, double undef 178; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2F64 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef 179; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4F64 = select <4 x i1> undef, <4 x double> undef, <4 x double> undef 180; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8F64 = select <8 x i1> undef, <8 x double> undef, <8 x double> undef 181; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %F32 = select i1 undef, float undef, float undef 182; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4F32 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef 183; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8F32 = select <8 x i1> undef, <8 x float> undef, <8 x float> undef 184; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16F32 = select <16 x i1> undef, <16 x float> undef, <16 x float> undef 185; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef 186; 187; AVX512-LABEL: 'test_select_fp' 188; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %F64 = select i1 undef, double undef, double undef 189; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2F64 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef 190; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4F64 = select <4 x i1> undef, <4 x double> undef, <4 x double> undef 191; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8F64 = select <8 x i1> undef, <8 x double> undef, <8 x double> undef 192; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %F32 = select i1 undef, float undef, float undef 193; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4F32 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef 194; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8F32 = select <8 x i1> undef, <8 x float> undef, <8 x float> undef 195; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16F32 = select <16 x i1> undef, <16 x float> undef, <16 x float> undef 196; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef 197; 198 %F64 = select i1 undef, double undef, double undef 199 %V2F64 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef 200 %V4F64 = select <4 x i1> undef, <4 x double> undef, <4 x double> undef 201 %V8F64 = select <8 x i1> undef, <8 x double> undef, <8 x double> undef 202 203 %F32 = select i1 undef, float undef, float undef 204 %V4F32 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef 205 %V8F32 = select <8 x i1> undef, <8 x float> undef, <8 x float> undef 206 %V16F32 = select <16 x i1> undef, <16 x float> undef, <16 x float> undef 207 208 ret i32 undef 209} 210 211; Immediate blend instructions for <2 x double> and <4 x float> added at SSE41. 212; Integers of the same size should also use those instructions. 213 214define <2 x i64> @test_2i64(<2 x i64> %a, <2 x i64> %b) { 215; SSE2-LABEL: 'test_2i64' 216; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %sel = select <2 x i1> <i1 true, i1 false>, <2 x i64> %a, <2 x i64> %b 217; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %sel 218; 219; SSE4-LABEL: 'test_2i64' 220; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <2 x i1> <i1 true, i1 false>, <2 x i64> %a, <2 x i64> %b 221; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %sel 222; 223; AVX-LABEL: 'test_2i64' 224; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <2 x i1> <i1 true, i1 false>, <2 x i64> %a, <2 x i64> %b 225; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %sel 226; 227; AVX512-LABEL: 'test_2i64' 228; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <2 x i1> <i1 true, i1 false>, <2 x i64> %a, <2 x i64> %b 229; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %sel 230; 231 %sel = select <2 x i1> <i1 true, i1 false>, <2 x i64> %a, <2 x i64> %b 232 ret <2 x i64> %sel 233} 234 235define <2 x double> @test_2double(<2 x double> %a, <2 x double> %b) { 236; SSE2-LABEL: 'test_2double' 237; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %sel = select <2 x i1> <i1 true, i1 false>, <2 x double> %a, <2 x double> %b 238; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x double> %sel 239; 240; SSE4-LABEL: 'test_2double' 241; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <2 x i1> <i1 true, i1 false>, <2 x double> %a, <2 x double> %b 242; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x double> %sel 243; 244; AVX-LABEL: 'test_2double' 245; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <2 x i1> <i1 true, i1 false>, <2 x double> %a, <2 x double> %b 246; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x double> %sel 247; 248; AVX512-LABEL: 'test_2double' 249; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <2 x i1> <i1 true, i1 false>, <2 x double> %a, <2 x double> %b 250; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x double> %sel 251; 252 %sel = select <2 x i1> <i1 true, i1 false>, <2 x double> %a, <2 x double> %b 253 ret <2 x double> %sel 254} 255 256define <4 x i32> @test_4i32(<4 x i32> %a, <4 x i32> %b) { 257; SSE2-LABEL: 'test_4i32' 258; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> %a, <4 x i32> %b 259; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %sel 260; 261; SSE4-LABEL: 'test_4i32' 262; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> %a, <4 x i32> %b 263; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %sel 264; 265; AVX-LABEL: 'test_4i32' 266; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> %a, <4 x i32> %b 267; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %sel 268; 269; AVX512-LABEL: 'test_4i32' 270; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> %a, <4 x i32> %b 271; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %sel 272; 273 %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> %a, <4 x i32> %b 274 ret <4 x i32> %sel 275} 276 277define <4 x float> @test_4float(<4 x float> %a, <4 x float> %b) { 278; SSE2-LABEL: 'test_4float' 279; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x float> %a, <4 x float> %b 280; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %sel 281; 282; SSE4-LABEL: 'test_4float' 283; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x float> %a, <4 x float> %b 284; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %sel 285; 286; AVX-LABEL: 'test_4float' 287; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x float> %a, <4 x float> %b 288; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %sel 289; 290; AVX512-LABEL: 'test_4float' 291; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x float> %a, <4 x float> %b 292; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x float> %sel 293; 294 %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x float> %a, <4 x float> %b 295 ret <4 x float> %sel 296} 297 298define <16 x i8> @test_16i8(<16 x i8> %a, <16 x i8> %b) { 299; SSE2-LABEL: 'test_16i8' 300; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %sel = select <16 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true>, <16 x i8> %a, <16 x i8> %b 301; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %sel 302; 303; SSE4-LABEL: 'test_16i8' 304; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <16 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true>, <16 x i8> %a, <16 x i8> %b 305; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %sel 306; 307; AVX-LABEL: 'test_16i8' 308; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <16 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true>, <16 x i8> %a, <16 x i8> %b 309; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %sel 310; 311; AVX512-LABEL: 'test_16i8' 312; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <16 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true>, <16 x i8> %a, <16 x i8> %b 313; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %sel 314; 315 %sel = select <16 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true>, <16 x i8> %a, <16 x i8> %b 316 ret <16 x i8> %sel 317} 318 319; Immediate blend instructions for <4 x double> and <8 x float> added at AVX. 320; Integers of the same size should also use those instructions. 321 322define <4 x i64> @test_4i64(<4 x i64> %a, <4 x i64> %b) { 323; SSE2-LABEL: 'test_4i64' 324; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i64> %a, <4 x i64> %b 325; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %sel 326; 327; SSE4-LABEL: 'test_4i64' 328; SSE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i64> %a, <4 x i64> %b 329; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %sel 330; 331; AVX-LABEL: 'test_4i64' 332; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i64> %a, <4 x i64> %b 333; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %sel 334; 335; AVX512-LABEL: 'test_4i64' 336; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i64> %a, <4 x i64> %b 337; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %sel 338; 339 %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i64> %a, <4 x i64> %b 340 ret <4 x i64> %sel 341} 342 343define <4 x double> @test_4double(<4 x double> %a, <4 x double> %b) { 344; SSE2-LABEL: 'test_4double' 345; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x double> %a, <4 x double> %b 346; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x double> %sel 347; 348; SSE4-LABEL: 'test_4double' 349; SSE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x double> %a, <4 x double> %b 350; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x double> %sel 351; 352; AVX-LABEL: 'test_4double' 353; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x double> %a, <4 x double> %b 354; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x double> %sel 355; 356; AVX512-LABEL: 'test_4double' 357; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x double> %a, <4 x double> %b 358; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x double> %sel 359; 360 %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x double> %a, <4 x double> %b 361 ret <4 x double> %sel 362} 363 364define <8 x i32> @test_8i32(<8 x i32> %a, <8 x i32> %b) { 365; SSE2-LABEL: 'test_8i32' 366; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %sel = select <8 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 false>, <8 x i32> %a, <8 x i32> %b 367; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %sel 368; 369; SSE4-LABEL: 'test_8i32' 370; SSE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <8 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 false>, <8 x i32> %a, <8 x i32> %b 371; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %sel 372; 373; AVX-LABEL: 'test_8i32' 374; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <8 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 false>, <8 x i32> %a, <8 x i32> %b 375; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %sel 376; 377; AVX512-LABEL: 'test_8i32' 378; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <8 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 false>, <8 x i32> %a, <8 x i32> %b 379; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %sel 380; 381 %sel = select <8 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 false>, <8 x i32> %a, <8 x i32> %b 382 ret <8 x i32> %sel 383} 384 385define <8 x float> @test_8float(<8 x float> %a, <8 x float> %b) { 386; SSE2-LABEL: 'test_8float' 387; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %sel = select <8 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <8 x float> %a, <8 x float> %b 388; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x float> %sel 389; 390; SSE4-LABEL: 'test_8float' 391; SSE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <8 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <8 x float> %a, <8 x float> %b 392; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x float> %sel 393; 394; AVX-LABEL: 'test_8float' 395; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <8 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <8 x float> %a, <8 x float> %b 396; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x float> %sel 397; 398; AVX512-LABEL: 'test_8float' 399; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <8 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <8 x float> %a, <8 x float> %b 400; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x float> %sel 401; 402 %sel = select <8 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <8 x float> %a, <8 x float> %b 403 ret <8 x float> %sel 404} 405 406define <16 x i16> @test_16i16(<16 x i16> %a, <16 x i16> %b) { 407; SSE2-LABEL: 'test_16i16' 408; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %sel = select <16 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <16 x i16> %a, <16 x i16> %b 409; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %sel 410; 411; SSE4-LABEL: 'test_16i16' 412; SSE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <16 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <16 x i16> %a, <16 x i16> %b 413; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %sel 414; 415; AVX1-LABEL: 'test_16i16' 416; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %sel = select <16 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <16 x i16> %a, <16 x i16> %b 417; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %sel 418; 419; AVX2-LABEL: 'test_16i16' 420; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <16 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <16 x i16> %a, <16 x i16> %b 421; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %sel 422; 423; AVX512-LABEL: 'test_16i16' 424; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <16 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <16 x i16> %a, <16 x i16> %b 425; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %sel 426; 427 %sel = select <16 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <16 x i16> %a, <16 x i16> %b 428 ret <16 x i16> %sel 429} 430 431define <32 x i8> @test_32i8(<32 x i8> %a, <32 x i8> %b) { 432; SSE2-LABEL: 'test_32i8' 433; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %sel = select <32 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true>, <32 x i8> %a, <32 x i8> %b 434; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %sel 435; 436; SSE4-LABEL: 'test_32i8' 437; SSE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select <32 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true>, <32 x i8> %a, <32 x i8> %b 438; SSE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %sel 439; 440; AVX1-LABEL: 'test_32i8' 441; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %sel = select <32 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true>, <32 x i8> %a, <32 x i8> %b 442; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %sel 443; 444; AVX2-LABEL: 'test_32i8' 445; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <32 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true>, <32 x i8> %a, <32 x i8> %b 446; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %sel 447; 448; AVX512-LABEL: 'test_32i8' 449; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select <32 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true>, <32 x i8> %a, <32 x i8> %b 450; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %sel 451; 452 %sel = select <32 x i1> <i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true, i1 true, i1 false, i1 true, i1 true>, <32 x i8> %a, <32 x i8> %b 453 ret <32 x i8> %sel 454} 455 456