brintos

brintos / llvm-project-archived public Read only

0
0
Text · 48.6 KiB · f2c2890 Raw
557 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+sse2 | FileCheck %s -check-prefixes=SSE23; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+sse4.1 | FileCheck %s -check-prefixes=SSE44; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+avx | FileCheck %s -check-prefixes=AVX,AVX15; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+avx2 | FileCheck %s -check-prefixes=AVX,AVX26; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+avx512f,+avx512vl  | FileCheck %s -check-prefixes=AVX512,AVX512F7; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mattr=+avx512bw,+avx512vl | FileCheck %s -check-prefixes=AVX512,AVX512BW8;9; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mcpu=slm | FileCheck %s --check-prefixes=SLM10; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mcpu=goldmont | FileCheck %s --check-prefixes=SSE411; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=x86_64-- -mcpu=btver2 | FileCheck %s --check-prefixes=AVX,AVX112 13; Verify the cost of vector select instructions.14 15define i32 @test_select() {16; SSE2-LABEL: 'test_select'17; SSE2-NEXT:  Cost Model: Found costs of 1 for: %I64 = select i1 undef, i64 undef, i64 undef18; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef19; SSE2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:6 for: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef20; SSE2-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:12 Lat:8 SizeLat:12 for: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef21; SSE2-NEXT:  Cost Model: Found costs of 1 for: %I32 = select i1 undef, i32 undef, i32 undef22; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef23; SSE2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:6 for: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef24; SSE2-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:12 Lat:8 SizeLat:12 for: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef25; SSE2-NEXT:  Cost Model: Found costs of 1 for: %I16 = select i1 undef, i16 undef, i16 undef26; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef27; SSE2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:6 for: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef28; SSE2-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:12 Lat:8 SizeLat:12 for: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef29; SSE2-NEXT:  Cost Model: Found costs of 1 for: %I8 = select i1 undef, i8 undef, i8 undef30; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef31; SSE2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:6 for: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef32; SSE2-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:12 Lat:8 SizeLat:12 for: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef33; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef34;35; SSE4-LABEL: 'test_select'36; SSE4-NEXT:  Cost Model: Found costs of 1 for: %I64 = select i1 undef, i64 undef, i64 undef37; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef38; SSE4-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef39; SSE4-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef40; SSE4-NEXT:  Cost Model: Found costs of 1 for: %I32 = select i1 undef, i32 undef, i32 undef41; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef42; SSE4-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef43; SSE4-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef44; SSE4-NEXT:  Cost Model: Found costs of 1 for: %I16 = select i1 undef, i16 undef, i16 undef45; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef46; SSE4-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef47; SSE4-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef48; SSE4-NEXT:  Cost Model: Found costs of 1 for: %I8 = select i1 undef, i8 undef, i8 undef49; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef50; SSE4-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef51; SSE4-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef52; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef53;54; AVX1-LABEL: 'test_select'55; AVX1-NEXT:  Cost Model: Found costs of 1 for: %I64 = select i1 undef, i64 undef, i64 undef56; AVX1-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef57; AVX1-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:1 Lat:3 SizeLat:2 for: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef58; AVX1-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:2 Lat:6 SizeLat:4 for: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef59; AVX1-NEXT:  Cost Model: Found costs of 1 for: %I32 = select i1 undef, i32 undef, i32 undef60; AVX1-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef61; AVX1-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:1 Lat:3 SizeLat:2 for: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef62; AVX1-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:2 Lat:6 SizeLat:4 for: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef63; AVX1-NEXT:  Cost Model: Found costs of 1 for: %I16 = select i1 undef, i16 undef, i16 undef64; AVX1-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef65; AVX1-NEXT:  Cost Model: Found costs of 3 for: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef66; AVX1-NEXT:  Cost Model: Found costs of 6 for: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef67; AVX1-NEXT:  Cost Model: Found costs of 1 for: %I8 = select i1 undef, i8 undef, i8 undef68; AVX1-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef69; AVX1-NEXT:  Cost Model: Found costs of 3 for: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef70; AVX1-NEXT:  Cost Model: Found costs of 6 for: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef71; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef72;73; AVX2-LABEL: 'test_select'74; AVX2-NEXT:  Cost Model: Found costs of 1 for: %I64 = select i1 undef, i64 undef, i64 undef75; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef76; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef77; AVX2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef78; AVX2-NEXT:  Cost Model: Found costs of 1 for: %I32 = select i1 undef, i32 undef, i32 undef79; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef80; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef81; AVX2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef82; AVX2-NEXT:  Cost Model: Found costs of 1 for: %I16 = select i1 undef, i16 undef, i16 undef83; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef84; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef85; AVX2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef86; AVX2-NEXT:  Cost Model: Found costs of 1 for: %I8 = select i1 undef, i8 undef, i8 undef87; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef88; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef89; AVX2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef90; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef91;92; AVX512F-LABEL: 'test_select'93; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %I64 = select i1 undef, i64 undef, i64 undef94; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef95; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef96; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef97; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %I32 = select i1 undef, i32 undef, i32 undef98; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef99; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef100; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef101; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %I16 = select i1 undef, i16 undef, i16 undef102; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef103; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef104; AVX512F-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:4 Lat:2 SizeLat:4 for: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef105; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %I8 = select i1 undef, i8 undef, i8 undef106; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef107; AVX512F-NEXT:  Cost Model: Found costs of 1 for: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef108; AVX512F-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:4 Lat:2 SizeLat:4 for: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef109; AVX512F-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef110;111; AVX512BW-LABEL: 'test_select'112; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %I64 = select i1 undef, i64 undef, i64 undef113; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef114; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef115; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef116; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %I32 = select i1 undef, i32 undef, i32 undef117; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef118; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef119; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef120; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %I16 = select i1 undef, i16 undef, i16 undef121; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef122; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef123; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef124; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %I8 = select i1 undef, i8 undef, i8 undef125; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef126; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef127; AVX512BW-NEXT:  Cost Model: Found costs of 1 for: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef128; AVX512BW-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef129;130; SLM-LABEL: 'test_select'131; SLM-NEXT:  Cost Model: Found costs of 1 for: %I64 = select i1 undef, i64 undef, i64 undef132; SLM-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef133; SLM-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef134; SLM-NEXT:  Cost Model: Found costs of RThru:16 CodeSize:4 Lat:16 SizeLat:12 for: %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef135; SLM-NEXT:  Cost Model: Found costs of 1 for: %I32 = select i1 undef, i32 undef, i32 undef136; SLM-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef137; SLM-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef138; SLM-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef139; SLM-NEXT:  Cost Model: Found costs of 1 for: %I16 = select i1 undef, i16 undef, i16 undef140; SLM-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef141; SLM-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef142; SLM-NEXT:  Cost Model: Found costs of RThru:16 CodeSize:4 Lat:16 SizeLat:12 for: %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef143; SLM-NEXT:  Cost Model: Found costs of 1 for: %I8 = select i1 undef, i8 undef, i8 undef144; SLM-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef145; SLM-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef146; SLM-NEXT:  Cost Model: Found costs of RThru:16 CodeSize:4 Lat:16 SizeLat:12 for: %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef147; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef148;149  %I64 = select i1 undef, i64 undef, i64 undef150  %V2I64 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef151  %V4I64 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef152  %V8I64 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef153 154  %I32 = select i1 undef, i32 undef, i32 undef155  %V4I32 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef156  %V8I32 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef157  %V16I32 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef158 159  %I16 = select i1 undef, i16 undef, i16 undef160  %V8I16 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef161  %V16I16 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef162  %V32I16 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef163 164  %I8 = select i1 undef, i8 undef, i8 undef165  %V16I8 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef166  %V32I8 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef167  %V64I8 = select <64 x i1> undef, <64 x i8> undef, <64 x i8> undef168 169  ret i32 undef170}171 172define i32 @test_select_fp() {173; SSE2-LABEL: 'test_select_fp'174; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %F64 = select i1 undef, double undef, double undef175; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %V2F64 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef176; SSE2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:6 for: %V4F64 = select <4 x i1> undef, <4 x double> undef, <4 x double> undef177; SSE2-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:12 Lat:8 SizeLat:12 for: %V8F64 = select <8 x i1> undef, <8 x double> undef, <8 x double> undef178; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %F32 = select i1 undef, float undef, float undef179; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %V4F32 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef180; SSE2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:6 for: %V8F32 = select <8 x i1> undef, <8 x float> undef, <8 x float> undef181; SSE2-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:12 Lat:8 SizeLat:12 for: %V16F32 = select <16 x i1> undef, <16 x float> undef, <16 x float> undef182; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef183;184; SSE4-LABEL: 'test_select_fp'185; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %F64 = select i1 undef, double undef, double undef186; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V2F64 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef187; SSE4-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V4F64 = select <4 x i1> undef, <4 x double> undef, <4 x double> undef188; SSE4-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %V8F64 = select <8 x i1> undef, <8 x double> undef, <8 x double> undef189; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %F32 = select i1 undef, float undef, float undef190; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V4F32 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef191; SSE4-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V8F32 = select <8 x i1> undef, <8 x float> undef, <8 x float> undef192; SSE4-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %V16F32 = select <16 x i1> undef, <16 x float> undef, <16 x float> undef193; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef194;195; AVX1-LABEL: 'test_select_fp'196; AVX1-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %F64 = select i1 undef, double undef, double undef197; AVX1-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V2F64 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef198; AVX1-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:1 Lat:3 SizeLat:2 for: %V4F64 = select <4 x i1> undef, <4 x double> undef, <4 x double> undef199; AVX1-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:2 Lat:6 SizeLat:4 for: %V8F64 = select <8 x i1> undef, <8 x double> undef, <8 x double> undef200; AVX1-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %F32 = select i1 undef, float undef, float undef201; AVX1-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V4F32 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef202; AVX1-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:1 Lat:3 SizeLat:2 for: %V8F32 = select <8 x i1> undef, <8 x float> undef, <8 x float> undef203; AVX1-NEXT:  Cost Model: Found costs of RThru:6 CodeSize:2 Lat:6 SizeLat:4 for: %V16F32 = select <16 x i1> undef, <16 x float> undef, <16 x float> undef204; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef205;206; AVX2-LABEL: 'test_select_fp'207; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %F64 = select i1 undef, double undef, double undef208; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V2F64 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef209; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V4F64 = select <4 x i1> undef, <4 x double> undef, <4 x double> undef210; AVX2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V8F64 = select <8 x i1> undef, <8 x double> undef, <8 x double> undef211; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %F32 = select i1 undef, float undef, float undef212; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V4F32 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef213; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %V8F32 = select <8 x i1> undef, <8 x float> undef, <8 x float> undef214; AVX2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %V16F32 = select <16 x i1> undef, <16 x float> undef, <16 x float> undef215; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef216;217; AVX512-LABEL: 'test_select_fp'218; AVX512-NEXT:  Cost Model: Found costs of 1 for: %F64 = select i1 undef, double undef, double undef219; AVX512-NEXT:  Cost Model: Found costs of 1 for: %V2F64 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef220; AVX512-NEXT:  Cost Model: Found costs of 1 for: %V4F64 = select <4 x i1> undef, <4 x double> undef, <4 x double> undef221; AVX512-NEXT:  Cost Model: Found costs of 1 for: %V8F64 = select <8 x i1> undef, <8 x double> undef, <8 x double> undef222; AVX512-NEXT:  Cost Model: Found costs of 1 for: %F32 = select i1 undef, float undef, float undef223; AVX512-NEXT:  Cost Model: Found costs of 1 for: %V4F32 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef224; AVX512-NEXT:  Cost Model: Found costs of 1 for: %V8F32 = select <8 x i1> undef, <8 x float> undef, <8 x float> undef225; AVX512-NEXT:  Cost Model: Found costs of 1 for: %V16F32 = select <16 x i1> undef, <16 x float> undef, <16 x float> undef226; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef227;228; SLM-LABEL: 'test_select_fp'229; SLM-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %F64 = select i1 undef, double undef, double undef230; SLM-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %V2F64 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef231; SLM-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %V4F64 = select <4 x i1> undef, <4 x double> undef, <4 x double> undef232; SLM-NEXT:  Cost Model: Found costs of RThru:16 CodeSize:4 Lat:16 SizeLat:12 for: %V8F64 = select <8 x i1> undef, <8 x double> undef, <8 x double> undef233; SLM-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %F32 = select i1 undef, float undef, float undef234; SLM-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %V4F32 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef235; SLM-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %V8F32 = select <8 x i1> undef, <8 x float> undef, <8 x float> undef236; SLM-NEXT:  Cost Model: Found costs of RThru:16 CodeSize:4 Lat:16 SizeLat:12 for: %V16F32 = select <16 x i1> undef, <16 x float> undef, <16 x float> undef237; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef238;239  %F64 = select i1 undef, double undef, double undef240  %V2F64 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef241  %V4F64 = select <4 x i1> undef, <4 x double> undef, <4 x double> undef242  %V8F64 = select <8 x i1> undef, <8 x double> undef, <8 x double> undef243 244  %F32 = select i1 undef, float undef, float undef245  %V4F32 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef246  %V8F32 = select <8 x i1> undef, <8 x float> undef, <8 x float> undef247  %V16F32 = select <16 x i1> undef, <16 x float> undef, <16 x float> undef248 249  ret i32 undef250}251 252; Immediate blend instructions for <2 x double> and <4 x float> added at SSE41.253; Integers of the same size should also use those instructions.254 255define <2 x i64> @test_2i64(<2 x i64> %a, <2 x i64> %b) {256; SSE2-LABEL: 'test_2i64'257; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %sel = select <2 x i1> <i1 true, i1 false>, <2 x i64> %a, <2 x i64> %b258; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %sel259;260; SSE4-LABEL: 'test_2i64'261; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %sel = select <2 x i1> <i1 true, i1 false>, <2 x i64> %a, <2 x i64> %b262; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %sel263;264; AVX-LABEL: 'test_2i64'265; AVX-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %sel = select <2 x i1> <i1 true, i1 false>, <2 x i64> %a, <2 x i64> %b266; AVX-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %sel267;268; AVX512-LABEL: 'test_2i64'269; AVX512-NEXT:  Cost Model: Found costs of 1 for: %sel = select <2 x i1> <i1 true, i1 false>, <2 x i64> %a, <2 x i64> %b270; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %sel271;272; SLM-LABEL: 'test_2i64'273; SLM-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %sel = select <2 x i1> <i1 true, i1 false>, <2 x i64> %a, <2 x i64> %b274; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %sel275;276  %sel = select <2 x i1> <i1 true, i1 false>, <2 x i64> %a, <2 x i64> %b277  ret <2 x i64> %sel278}279 280define <2 x double> @test_2double(<2 x double> %a, <2 x double> %b) {281; SSE2-LABEL: 'test_2double'282; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %sel = select <2 x i1> <i1 true, i1 false>, <2 x double> %a, <2 x double> %b283; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x double> %sel284;285; SSE4-LABEL: 'test_2double'286; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %sel = select <2 x i1> <i1 true, i1 false>, <2 x double> %a, <2 x double> %b287; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x double> %sel288;289; AVX-LABEL: 'test_2double'290; AVX-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %sel = select <2 x i1> <i1 true, i1 false>, <2 x double> %a, <2 x double> %b291; AVX-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x double> %sel292;293; AVX512-LABEL: 'test_2double'294; AVX512-NEXT:  Cost Model: Found costs of 1 for: %sel = select <2 x i1> <i1 true, i1 false>, <2 x double> %a, <2 x double> %b295; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x double> %sel296;297; SLM-LABEL: 'test_2double'298; SLM-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %sel = select <2 x i1> <i1 true, i1 false>, <2 x double> %a, <2 x double> %b299; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x double> %sel300;301  %sel = select <2 x i1> <i1 true, i1 false>, <2 x double> %a, <2 x double> %b302  ret <2 x double> %sel303}304 305define <4 x i32> @test_4i32(<4 x i32> %a, <4 x i32> %b) {306; SSE2-LABEL: 'test_4i32'307; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> %a, <4 x i32> %b308; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %sel309;310; SSE4-LABEL: 'test_4i32'311; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> %a, <4 x i32> %b312; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %sel313;314; AVX-LABEL: 'test_4i32'315; AVX-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> %a, <4 x i32> %b316; AVX-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %sel317;318; AVX512-LABEL: 'test_4i32'319; AVX512-NEXT:  Cost Model: Found costs of 1 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> %a, <4 x i32> %b320; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %sel321;322; SLM-LABEL: 'test_4i32'323; SLM-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> %a, <4 x i32> %b324; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %sel325;326  %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x i32> %a, <4 x i32> %b327  ret <4 x i32> %sel328}329 330define <4 x float> @test_4float(<4 x float> %a, <4 x float> %b) {331; SSE2-LABEL: 'test_4float'332; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x float> %a, <4 x float> %b333; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x float> %sel334;335; SSE4-LABEL: 'test_4float'336; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x float> %a, <4 x float> %b337; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x float> %sel338;339; AVX-LABEL: 'test_4float'340; AVX-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x float> %a, <4 x float> %b341; AVX-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x float> %sel342;343; AVX512-LABEL: 'test_4float'344; AVX512-NEXT:  Cost Model: Found costs of 1 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x float> %a, <4 x float> %b345; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x float> %sel346;347; SLM-LABEL: 'test_4float'348; SLM-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x float> %a, <4 x float> %b349; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x float> %sel350;351  %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x float> %a, <4 x float> %b352  ret <4 x float> %sel353}354 355define <16 x i8> @test_16i8(<16 x i8> %a, <16 x i8> %b) {356; SSE2-LABEL: 'test_16i8'357; SSE2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:3 Lat:2 SizeLat:3 for: %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> %b358; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %sel359;360; SSE4-LABEL: 'test_16i8'361; SSE4-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %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> %b362; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %sel363;364; AVX-LABEL: 'test_16i8'365; AVX-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %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> %b366; AVX-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %sel367;368; AVX512-LABEL: 'test_16i8'369; AVX512-NEXT:  Cost Model: Found costs of 1 for: %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> %b370; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %sel371;372; SLM-LABEL: 'test_16i8'373; SLM-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:1 Lat:4 SizeLat:3 for: %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> %b374; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %sel375;376  %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> %b377  ret <16 x i8> %sel378}379 380; Immediate blend instructions for <4 x double> and <8 x float> added at AVX.381; Integers of the same size should also use those instructions.382 383define <4 x i64> @test_4i64(<4 x i64> %a, <4 x i64> %b) {384; SSE2-LABEL: 'test_4i64'385; SSE2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:6 for: %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i64> %a, <4 x i64> %b386; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %sel387;388; SSE4-LABEL: 'test_4i64'389; SSE4-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i64> %a, <4 x i64> %b390; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %sel391;392; AVX1-LABEL: 'test_4i64'393; AVX1-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:1 Lat:3 SizeLat:2 for: %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i64> %a, <4 x i64> %b394; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %sel395;396; AVX2-LABEL: 'test_4i64'397; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i64> %a, <4 x i64> %b398; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %sel399;400; AVX512-LABEL: 'test_4i64'401; AVX512-NEXT:  Cost Model: Found costs of 1 for: %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i64> %a, <4 x i64> %b402; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %sel403;404; SLM-LABEL: 'test_4i64'405; SLM-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i64> %a, <4 x i64> %b406; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %sel407;408  %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i64> %a, <4 x i64> %b409  ret <4 x i64> %sel410}411 412define <4 x double> @test_4double(<4 x double> %a, <4 x double> %b) {413; SSE2-LABEL: 'test_4double'414; SSE2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:6 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x double> %a, <4 x double> %b415; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x double> %sel416;417; SSE4-LABEL: 'test_4double'418; SSE4-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x double> %a, <4 x double> %b419; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x double> %sel420;421; AVX1-LABEL: 'test_4double'422; AVX1-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:1 Lat:3 SizeLat:2 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x double> %a, <4 x double> %b423; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x double> %sel424;425; AVX2-LABEL: 'test_4double'426; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x double> %a, <4 x double> %b427; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x double> %sel428;429; AVX512-LABEL: 'test_4double'430; AVX512-NEXT:  Cost Model: Found costs of 1 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x double> %a, <4 x double> %b431; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x double> %sel432;433; SLM-LABEL: 'test_4double'434; SLM-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x double> %a, <4 x double> %b435; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x double> %sel436;437  %sel = select <4 x i1> <i1 true, i1 false, i1 true, i1 false>, <4 x double> %a, <4 x double> %b438  ret <4 x double> %sel439}440 441define <8 x i32> @test_8i32(<8 x i32> %a, <8 x i32> %b) {442; SSE2-LABEL: 'test_8i32'443; SSE2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:6 for: %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> %b444; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %sel445;446; SSE4-LABEL: 'test_8i32'447; SSE4-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %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> %b448; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %sel449;450; AVX1-LABEL: 'test_8i32'451; AVX1-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:1 Lat:3 SizeLat:2 for: %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> %b452; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %sel453;454; AVX2-LABEL: 'test_8i32'455; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %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> %b456; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %sel457;458; AVX512-LABEL: 'test_8i32'459; AVX512-NEXT:  Cost Model: Found costs of 1 for: %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> %b460; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %sel461;462; SLM-LABEL: 'test_8i32'463; SLM-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %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> %b464; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %sel465;466  %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> %b467  ret <8 x i32> %sel468}469 470define <8 x float> @test_8float(<8 x float> %a, <8 x float> %b) {471; SSE2-LABEL: 'test_8float'472; SSE2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:6 for: %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> %b473; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x float> %sel474;475; SSE4-LABEL: 'test_8float'476; SSE4-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %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> %b477; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x float> %sel478;479; AVX1-LABEL: 'test_8float'480; AVX1-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:1 Lat:3 SizeLat:2 for: %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> %b481; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x float> %sel482;483; AVX2-LABEL: 'test_8float'484; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %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> %b485; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x float> %sel486;487; AVX512-LABEL: 'test_8float'488; AVX512-NEXT:  Cost Model: Found costs of 1 for: %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> %b489; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x float> %sel490;491; SLM-LABEL: 'test_8float'492; SLM-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %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> %b493; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x float> %sel494;495  %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> %b496  ret <8 x float> %sel497}498 499define <16 x i16> @test_16i16(<16 x i16> %a, <16 x i16> %b) {500; SSE2-LABEL: 'test_16i16'501; SSE2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:6 for: %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> %b502; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %sel503;504; SSE4-LABEL: 'test_16i16'505; SSE4-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %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> %b506; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %sel507;508; AVX1-LABEL: 'test_16i16'509; AVX1-NEXT:  Cost Model: Found costs of 3 for: %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> %b510; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %sel511;512; AVX2-LABEL: 'test_16i16'513; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %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> %b514; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %sel515;516; AVX512-LABEL: 'test_16i16'517; AVX512-NEXT:  Cost Model: Found costs of 1 for: %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> %b518; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %sel519;520; SLM-LABEL: 'test_16i16'521; SLM-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %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> %b522; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %sel523;524  %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> %b525  ret <16 x i16> %sel526}527 528define <32 x i8> @test_32i8(<32 x i8> %a, <32 x i8> %b) {529; SSE2-LABEL: 'test_32i8'530; SSE2-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:6 Lat:4 SizeLat:6 for: %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> %b531; SSE2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %sel532;533; SSE4-LABEL: 'test_32i8'534; SSE4-NEXT:  Cost Model: Found costs of RThru:4 CodeSize:2 Lat:4 SizeLat:4 for: %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> %b535; SSE4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %sel536;537; AVX1-LABEL: 'test_32i8'538; AVX1-NEXT:  Cost Model: Found costs of 3 for: %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> %b539; AVX1-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %sel540;541; AVX2-LABEL: 'test_32i8'542; AVX2-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %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> %b543; AVX2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %sel544;545; AVX512-LABEL: 'test_32i8'546; AVX512-NEXT:  Cost Model: Found costs of 1 for: %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> %b547; AVX512-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %sel548;549; SLM-LABEL: 'test_32i8'550; SLM-NEXT:  Cost Model: Found costs of RThru:8 CodeSize:2 Lat:8 SizeLat:6 for: %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> %b551; SLM-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %sel552;553  %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> %b554  ret <32 x i8> %sel555}556 557