782 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa %s | FileCheck -check-prefixes=ALL,CI %s3; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=fiji %s | FileCheck -check-prefixes=ALL,GFX89 %s4; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 %s | FileCheck -check-prefixes=ALL,GFX89 %s5; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa %s | FileCheck -check-prefixes=ALL-SIZE,CI-SIZE %s6; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=fiji %s | FileCheck -check-prefixes=ALL-SIZE,GFX89-SIZE %s7; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 %s | FileCheck -check-prefixes=ALL-SIZE,GFX89-SIZE %s8; END.9 10define amdgpu_kernel void @insertelement_i8(i32 %arg) {11; ALL-LABEL: 'insertelement_i8'12; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 42, i32 013; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_0 = insertelement <3 x i8> undef, i8 42, i32 014; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> undef, i8 42, i32 015; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_0 = insertelement <5 x i8> undef, i8 42, i32 016; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 42, i32 117; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_1 = insertelement <3 x i8> undef, i8 42, i32 118; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 42, i32 119; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_1 = insertelement <5 x i8> undef, i8 42, i32 120; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_a = insertelement <2 x i8> undef, i8 42, i32 %arg21; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_a = insertelement <3 x i8> undef, i8 42, i32 %arg22; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_a = insertelement <4 x i8> undef, i8 42, i32 %arg23; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_a = insertelement <5 x i8> undef, i8 42, i32 %arg24; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void25;26; ALL-SIZE-LABEL: 'insertelement_i8'27; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 42, i32 028; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_0 = insertelement <3 x i8> undef, i8 42, i32 029; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> undef, i8 42, i32 030; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_0 = insertelement <5 x i8> undef, i8 42, i32 031; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 42, i32 132; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_1 = insertelement <3 x i8> undef, i8 42, i32 133; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 42, i32 134; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_1 = insertelement <5 x i8> undef, i8 42, i32 135; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_a = insertelement <2 x i8> undef, i8 42, i32 %arg36; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_a = insertelement <3 x i8> undef, i8 42, i32 %arg37; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_a = insertelement <4 x i8> undef, i8 42, i32 %arg38; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_a = insertelement <5 x i8> undef, i8 42, i32 %arg39; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void40;41 %v2i8_0 = insertelement <2 x i8> undef, i8 42, i32 042 %v3i8_0 = insertelement <3 x i8> undef, i8 42, i32 043 %v4i8_0 = insertelement <4 x i8> undef, i8 42, i32 044 %v5i8_0 = insertelement <5 x i8> undef, i8 42, i32 045 %v2i8_1 = insertelement <2 x i8> undef, i8 42, i32 146 %v3i8_1 = insertelement <3 x i8> undef, i8 42, i32 147 %v4i8_1 = insertelement <4 x i8> undef, i8 42, i32 148 %v5i8_1 = insertelement <5 x i8> undef, i8 42, i32 149 %v2i8_a = insertelement <2 x i8> undef, i8 42, i32 %arg50 %v3i8_a = insertelement <3 x i8> undef, i8 42, i32 %arg51 %v4i8_a = insertelement <4 x i8> undef, i8 42, i32 %arg52 %v5i8_a = insertelement <5 x i8> undef, i8 42, i32 %arg53 ret void54}55 56define amdgpu_kernel void @insertelement_i16(i32 %arg) {57; CI-LABEL: 'insertelement_i16'58; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 42, i32 059; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_0 = insertelement <3 x i16> undef, i16 42, i32 060; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = insertelement <4 x i16> undef, i16 42, i32 061; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_0 = insertelement <5 x i16> undef, i16 42, i32 062; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 42, i32 163; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_1 = insertelement <3 x i16> undef, i16 42, i32 164; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 42, i32 165; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_1 = insertelement <5 x i16> undef, i16 42, i32 166; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_a = insertelement <2 x i16> undef, i16 42, i32 %arg67; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_a = insertelement <3 x i16> undef, i16 42, i32 %arg68; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_a = insertelement <4 x i16> undef, i16 42, i32 %arg69; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_a = insertelement <5 x i16> undef, i16 42, i32 %arg70; CI-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void71;72; GFX89-LABEL: 'insertelement_i16'73; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 42, i32 074; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i16_0 = insertelement <3 x i16> undef, i16 42, i32 075; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i16_0 = insertelement <4 x i16> undef, i16 42, i32 076; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i16_0 = insertelement <5 x i16> undef, i16 42, i32 077; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 42, i32 178; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_1 = insertelement <3 x i16> undef, i16 42, i32 179; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 42, i32 180; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_1 = insertelement <5 x i16> undef, i16 42, i32 181; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_a = insertelement <2 x i16> undef, i16 42, i32 %arg82; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_a = insertelement <3 x i16> undef, i16 42, i32 %arg83; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_a = insertelement <4 x i16> undef, i16 42, i32 %arg84; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_a = insertelement <5 x i16> undef, i16 42, i32 %arg85; GFX89-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void86;87; CI-SIZE-LABEL: 'insertelement_i16'88; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 42, i32 089; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_0 = insertelement <3 x i16> undef, i16 42, i32 090; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = insertelement <4 x i16> undef, i16 42, i32 091; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_0 = insertelement <5 x i16> undef, i16 42, i32 092; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 42, i32 193; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_1 = insertelement <3 x i16> undef, i16 42, i32 194; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 42, i32 195; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_1 = insertelement <5 x i16> undef, i16 42, i32 196; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_a = insertelement <2 x i16> undef, i16 42, i32 %arg97; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_a = insertelement <3 x i16> undef, i16 42, i32 %arg98; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_a = insertelement <4 x i16> undef, i16 42, i32 %arg99; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_a = insertelement <5 x i16> undef, i16 42, i32 %arg100; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void101;102; GFX89-SIZE-LABEL: 'insertelement_i16'103; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 42, i32 0104; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i16_0 = insertelement <3 x i16> undef, i16 42, i32 0105; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i16_0 = insertelement <4 x i16> undef, i16 42, i32 0106; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i16_0 = insertelement <5 x i16> undef, i16 42, i32 0107; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 42, i32 1108; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_1 = insertelement <3 x i16> undef, i16 42, i32 1109; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 42, i32 1110; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_1 = insertelement <5 x i16> undef, i16 42, i32 1111; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_a = insertelement <2 x i16> undef, i16 42, i32 %arg112; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_a = insertelement <3 x i16> undef, i16 42, i32 %arg113; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_a = insertelement <4 x i16> undef, i16 42, i32 %arg114; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_a = insertelement <5 x i16> undef, i16 42, i32 %arg115; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void116;117 %v2i16_0 = insertelement <2 x i16> undef, i16 42, i32 0118 %v3i16_0 = insertelement <3 x i16> undef, i16 42, i32 0119 %v4i16_0 = insertelement <4 x i16> undef, i16 42, i32 0120 %v5i16_0 = insertelement <5 x i16> undef, i16 42, i32 0121 %v2i16_1 = insertelement <2 x i16> undef, i16 42, i32 1122 %v3i16_1 = insertelement <3 x i16> undef, i16 42, i32 1123 %v4i16_1 = insertelement <4 x i16> undef, i16 42, i32 1124 %v5i16_1 = insertelement <5 x i16> undef, i16 42, i32 1125 %v2i16_a = insertelement <2 x i16> undef, i16 42, i32 %arg126 %v3i16_a = insertelement <3 x i16> undef, i16 42, i32 %arg127 %v4i16_a = insertelement <4 x i16> undef, i16 42, i32 %arg128 %v5i16_a = insertelement <5 x i16> undef, i16 42, i32 %arg129 ret void130}131 132define amdgpu_kernel void @insertelement_i32(i32 %arg) {133; ALL-LABEL: 'insertelement_i32'134; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 42, i32 0135; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_0 = insertelement <3 x i32> undef, i32 42, i32 0136; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_0 = insertelement <4 x i32> undef, i32 42, i32 0137; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_0 = insertelement <5 x i32> undef, i32 42, i32 0138; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 42, i32 1139; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_1 = insertelement <3 x i32> undef, i32 42, i32 1140; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 42, i32 1141; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_1 = insertelement <5 x i32> undef, i32 42, i32 1142; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = insertelement <2 x i32> undef, i32 42, i32 %arg143; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3i32_a = insertelement <3 x i32> undef, i32 42, i32 %arg144; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = insertelement <4 x i32> undef, i32 42, i32 %arg145; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v5i32_a = insertelement <5 x i32> undef, i32 42, i32 %arg146; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void147;148; ALL-SIZE-LABEL: 'insertelement_i32'149; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 42, i32 0150; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_0 = insertelement <3 x i32> undef, i32 42, i32 0151; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_0 = insertelement <4 x i32> undef, i32 42, i32 0152; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_0 = insertelement <5 x i32> undef, i32 42, i32 0153; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 42, i32 1154; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_1 = insertelement <3 x i32> undef, i32 42, i32 1155; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 42, i32 1156; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_1 = insertelement <5 x i32> undef, i32 42, i32 1157; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = insertelement <2 x i32> undef, i32 42, i32 %arg158; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3i32_a = insertelement <3 x i32> undef, i32 42, i32 %arg159; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = insertelement <4 x i32> undef, i32 42, i32 %arg160; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v5i32_a = insertelement <5 x i32> undef, i32 42, i32 %arg161; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void162;163 %v2i32_0 = insertelement <2 x i32> undef, i32 42, i32 0164 %v3i32_0 = insertelement <3 x i32> undef, i32 42, i32 0165 %v4i32_0 = insertelement <4 x i32> undef, i32 42, i32 0166 %v5i32_0 = insertelement <5 x i32> undef, i32 42, i32 0167 %v2i32_1 = insertelement <2 x i32> undef, i32 42, i32 1168 %v3i32_1 = insertelement <3 x i32> undef, i32 42, i32 1169 %v4i32_1 = insertelement <4 x i32> undef, i32 42, i32 1170 %v5i32_1 = insertelement <5 x i32> undef, i32 42, i32 1171 %v2i32_a = insertelement <2 x i32> undef, i32 42, i32 %arg172 %v3i32_a = insertelement <3 x i32> undef, i32 42, i32 %arg173 %v4i32_a = insertelement <4 x i32> undef, i32 42, i32 %arg174 %v5i32_a = insertelement <5 x i32> undef, i32 42, i32 %arg175 ret void176}177 178define amdgpu_kernel void @insertelement_i64(i32 %arg) {179; ALL-LABEL: 'insertelement_i64'180; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 42, i32 0181; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_0 = insertelement <3 x i64> undef, i64 42, i32 0182; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_0 = insertelement <4 x i64> undef, i64 42, i32 0183; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_0 = insertelement <5 x i64> undef, i64 42, i32 0184; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 42, i32 1185; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_1 = insertelement <3 x i64> undef, i64 42, i32 1186; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 42, i32 1187; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_1 = insertelement <5 x i64> undef, i64 42, i32 1188; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = insertelement <2 x i64> undef, i64 42, i32 %arg189; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3i64_a = insertelement <3 x i64> undef, i64 42, i32 %arg190; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_a = insertelement <4 x i64> undef, i64 42, i32 %arg191; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v5i64_a = insertelement <5 x i64> undef, i64 42, i32 %arg192; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void193;194; ALL-SIZE-LABEL: 'insertelement_i64'195; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 42, i32 0196; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_0 = insertelement <3 x i64> undef, i64 42, i32 0197; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_0 = insertelement <4 x i64> undef, i64 42, i32 0198; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_0 = insertelement <5 x i64> undef, i64 42, i32 0199; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 42, i32 1200; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_1 = insertelement <3 x i64> undef, i64 42, i32 1201; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 42, i32 1202; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_1 = insertelement <5 x i64> undef, i64 42, i32 1203; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = insertelement <2 x i64> undef, i64 42, i32 %arg204; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3i64_a = insertelement <3 x i64> undef, i64 42, i32 %arg205; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_a = insertelement <4 x i64> undef, i64 42, i32 %arg206; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v5i64_a = insertelement <5 x i64> undef, i64 42, i32 %arg207; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void208;209 %v2i64_0 = insertelement <2 x i64> undef, i64 42, i32 0210 %v3i64_0 = insertelement <3 x i64> undef, i64 42, i32 0211 %v4i64_0 = insertelement <4 x i64> undef, i64 42, i32 0212 %v5i64_0 = insertelement <5 x i64> undef, i64 42, i32 0213 %v2i64_1 = insertelement <2 x i64> undef, i64 42, i32 1214 %v3i64_1 = insertelement <3 x i64> undef, i64 42, i32 1215 %v4i64_1 = insertelement <4 x i64> undef, i64 42, i32 1216 %v5i64_1 = insertelement <5 x i64> undef, i64 42, i32 1217 %v2i64_a = insertelement <2 x i64> undef, i64 42, i32 %arg218 %v3i64_a = insertelement <3 x i64> undef, i64 42, i32 %arg219 %v4i64_a = insertelement <4 x i64> undef, i64 42, i32 %arg220 %v5i64_a = insertelement <5 x i64> undef, i64 42, i32 %arg221 ret void222}223 224define i32 @insert_double_poison(i32 %arg) {225; ALL-LABEL: 'insert_double_poison'226; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f64_a = insertelement <2 x double> poison, double undef, i32 %arg227; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_0 = insertelement <2 x double> poison, double undef, i32 0228; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_1 = insertelement <2 x double> poison, double undef, i32 1229; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64_a = insertelement <4 x double> poison, double undef, i32 %arg230; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4f64_0 = insertelement <4 x double> poison, double undef, i32 0231; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4f64_3 = insertelement <4 x double> poison, double undef, i32 3232; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f64_a = insertelement <8 x double> poison, double undef, i32 %arg233; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f64_0 = insertelement <8 x double> poison, double undef, i32 0234; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f64_3 = insertelement <8 x double> poison, double undef, i32 3235; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f64_4 = insertelement <8 x double> poison, double undef, i32 4236; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f64_7 = insertelement <8 x double> poison, double undef, i32 7237; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef238;239; ALL-SIZE-LABEL: 'insert_double_poison'240; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f64_a = insertelement <2 x double> poison, double undef, i32 %arg241; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_0 = insertelement <2 x double> poison, double undef, i32 0242; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_1 = insertelement <2 x double> poison, double undef, i32 1243; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64_a = insertelement <4 x double> poison, double undef, i32 %arg244; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4f64_0 = insertelement <4 x double> poison, double undef, i32 0245; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4f64_3 = insertelement <4 x double> poison, double undef, i32 3246; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f64_a = insertelement <8 x double> poison, double undef, i32 %arg247; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f64_0 = insertelement <8 x double> poison, double undef, i32 0248; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f64_3 = insertelement <8 x double> poison, double undef, i32 3249; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f64_4 = insertelement <8 x double> poison, double undef, i32 4250; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f64_7 = insertelement <8 x double> poison, double undef, i32 7251; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef252;253 %v2f64_a = insertelement <2 x double> poison, double undef, i32 %arg254 %v2f64_0 = insertelement <2 x double> poison, double undef, i32 0255 %v2f64_1 = insertelement <2 x double> poison, double undef, i32 1256 257 %v4f64_a = insertelement <4 x double> poison, double undef, i32 %arg258 %v4f64_0 = insertelement <4 x double> poison, double undef, i32 0259 %v4f64_3 = insertelement <4 x double> poison, double undef, i32 3260 261 %v8f64_a = insertelement <8 x double> poison, double undef, i32 %arg262 %v8f64_0 = insertelement <8 x double> poison, double undef, i32 0263 %v8f64_3 = insertelement <8 x double> poison, double undef, i32 3264 %v8f64_4 = insertelement <8 x double> poison, double undef, i32 4265 %v8f64_7 = insertelement <8 x double> poison, double undef, i32 7266 267 ret i32 undef268}269 270define i32 @insert_float_poison(i32 %arg) {271; ALL-LABEL: 'insert_float_poison'272; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32_a = insertelement <2 x float> poison, float undef, i32 %arg273; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_0 = insertelement <2 x float> poison, float undef, i32 0274; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_1 = insertelement <2 x float> poison, float undef, i32 1275; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f32_a = insertelement <4 x float> poison, float undef, i32 %arg276; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4f32_0 = insertelement <4 x float> poison, float undef, i32 0277; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4f32_3 = insertelement <4 x float> poison, float undef, i32 3278; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32_a = insertelement <8 x float> poison, float undef, i32 %arg279; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f32_0 = insertelement <8 x float> poison, float undef, i32 0280; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f32_3 = insertelement <8 x float> poison, float undef, i32 3281; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f32_4 = insertelement <8 x float> poison, float undef, i32 4282; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f32_7 = insertelement <8 x float> poison, float undef, i32 7283; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f32_a = insertelement <16 x float> poison, float undef, i32 %arg284; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16f32_0 = insertelement <16 x float> poison, float undef, i32 0285; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16f32_3 = insertelement <16 x float> poison, float undef, i32 3286; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16f32_8 = insertelement <16 x float> poison, float undef, i32 8287; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16f32_15 = insertelement <16 x float> poison, float undef, i32 15288; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef289;290; ALL-SIZE-LABEL: 'insert_float_poison'291; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32_a = insertelement <2 x float> poison, float undef, i32 %arg292; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_0 = insertelement <2 x float> poison, float undef, i32 0293; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_1 = insertelement <2 x float> poison, float undef, i32 1294; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f32_a = insertelement <4 x float> poison, float undef, i32 %arg295; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4f32_0 = insertelement <4 x float> poison, float undef, i32 0296; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4f32_3 = insertelement <4 x float> poison, float undef, i32 3297; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32_a = insertelement <8 x float> poison, float undef, i32 %arg298; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f32_0 = insertelement <8 x float> poison, float undef, i32 0299; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f32_3 = insertelement <8 x float> poison, float undef, i32 3300; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f32_4 = insertelement <8 x float> poison, float undef, i32 4301; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8f32_7 = insertelement <8 x float> poison, float undef, i32 7302; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f32_a = insertelement <16 x float> poison, float undef, i32 %arg303; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16f32_0 = insertelement <16 x float> poison, float undef, i32 0304; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16f32_3 = insertelement <16 x float> poison, float undef, i32 3305; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16f32_8 = insertelement <16 x float> poison, float undef, i32 8306; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16f32_15 = insertelement <16 x float> poison, float undef, i32 15307; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef308;309 %v2f32_a = insertelement <2 x float> poison, float undef, i32 %arg310 %v2f32_0 = insertelement <2 x float> poison, float undef, i32 0311 %v2f32_1 = insertelement <2 x float> poison, float undef, i32 1312 313 %v4f32_a = insertelement <4 x float> poison, float undef, i32 %arg314 %v4f32_0 = insertelement <4 x float> poison, float undef, i32 0315 %v4f32_3 = insertelement <4 x float> poison, float undef, i32 3316 317 %v8f32_a = insertelement <8 x float> poison, float undef, i32 %arg318 %v8f32_0 = insertelement <8 x float> poison, float undef, i32 0319 %v8f32_3 = insertelement <8 x float> poison, float undef, i32 3320 %v8f32_4 = insertelement <8 x float> poison, float undef, i32 4321 %v8f32_7 = insertelement <8 x float> poison, float undef, i32 7322 323 %v16f32_a = insertelement <16 x float> poison, float undef, i32 %arg324 %v16f32_0 = insertelement <16 x float> poison, float undef, i32 0325 %v16f32_3 = insertelement <16 x float> poison, float undef, i32 3326 %v16f32_8 = insertelement <16 x float> poison, float undef, i32 8327 %v16f32_15 = insertelement <16 x float> poison, float undef, i32 15328 329 ret i32 undef330}331 332define i32 @insert_i64_poison(i32 %arg) {333; ALL-LABEL: 'insert_i64_poison'334; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = insertelement <2 x i64> poison, i64 undef, i32 %arg335; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_0 = insertelement <2 x i64> poison, i64 undef, i32 0336; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_1 = insertelement <2 x i64> poison, i64 undef, i32 1337; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_a = insertelement <4 x i64> poison, i64 undef, i32 %arg338; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_0 = insertelement <4 x i64> poison, i64 undef, i32 0339; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_3 = insertelement <4 x i64> poison, i64 undef, i32 3340; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_a = insertelement <8 x i64> poison, i64 undef, i32 %arg341; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_0 = insertelement <8 x i64> poison, i64 undef, i32 0342; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_3 = insertelement <8 x i64> poison, i64 undef, i32 3343; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_4 = insertelement <8 x i64> poison, i64 undef, i32 4344; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_7 = insertelement <8 x i64> poison, i64 undef, i32 7345; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef346;347; ALL-SIZE-LABEL: 'insert_i64_poison'348; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = insertelement <2 x i64> poison, i64 undef, i32 %arg349; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_0 = insertelement <2 x i64> poison, i64 undef, i32 0350; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_1 = insertelement <2 x i64> poison, i64 undef, i32 1351; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_a = insertelement <4 x i64> poison, i64 undef, i32 %arg352; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_0 = insertelement <4 x i64> poison, i64 undef, i32 0353; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_3 = insertelement <4 x i64> poison, i64 undef, i32 3354; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_a = insertelement <8 x i64> poison, i64 undef, i32 %arg355; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_0 = insertelement <8 x i64> poison, i64 undef, i32 0356; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_3 = insertelement <8 x i64> poison, i64 undef, i32 3357; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_4 = insertelement <8 x i64> poison, i64 undef, i32 4358; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_7 = insertelement <8 x i64> poison, i64 undef, i32 7359; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef360;361 %v2i64_a = insertelement <2 x i64> poison, i64 undef, i32 %arg362 %v2i64_0 = insertelement <2 x i64> poison, i64 undef, i32 0363 %v2i64_1 = insertelement <2 x i64> poison, i64 undef, i32 1364 365 %v4i64_a = insertelement <4 x i64> poison, i64 undef, i32 %arg366 %v4i64_0 = insertelement <4 x i64> poison, i64 undef, i32 0367 %v4i64_3 = insertelement <4 x i64> poison, i64 undef, i32 3368 369 %v8i64_a = insertelement <8 x i64> poison, i64 undef, i32 %arg370 %v8i64_0 = insertelement <8 x i64> poison, i64 undef, i32 0371 %v8i64_3 = insertelement <8 x i64> poison, i64 undef, i32 3372 %v8i64_4 = insertelement <8 x i64> poison, i64 undef, i32 4373 %v8i64_7 = insertelement <8 x i64> poison, i64 undef, i32 7374 375 ret i32 undef376}377 378define i32 @insert_i32_poison(i32 %arg) {379; ALL-LABEL: 'insert_i32_poison'380; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = insertelement <2 x i32> poison, i32 undef, i32 %arg381; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_0 = insertelement <2 x i32> poison, i32 undef, i32 0382; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_1 = insertelement <2 x i32> poison, i32 undef, i32 1383; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = insertelement <4 x i32> poison, i32 undef, i32 %arg384; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_0 = insertelement <4 x i32> poison, i32 undef, i32 0385; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_3 = insertelement <4 x i32> poison, i32 undef, i32 3386; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_a = insertelement <8 x i32> poison, i32 undef, i32 %arg387; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_0 = insertelement <8 x i32> poison, i32 undef, i32 0388; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_3 = insertelement <8 x i32> poison, i32 undef, i32 3389; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_4 = insertelement <8 x i32> poison, i32 undef, i32 4390; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_7 = insertelement <8 x i32> poison, i32 undef, i32 7391; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_a = insertelement <16 x i32> poison, i32 undef, i32 %arg392; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i32_0 = insertelement <16 x i32> poison, i32 undef, i32 0393; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i32_3 = insertelement <16 x i32> poison, i32 undef, i32 3394; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i32_8 = insertelement <16 x i32> poison, i32 undef, i32 8395; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i32_15 = insertelement <16 x i32> poison, i32 undef, i32 15396; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef397;398; ALL-SIZE-LABEL: 'insert_i32_poison'399; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = insertelement <2 x i32> poison, i32 undef, i32 %arg400; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_0 = insertelement <2 x i32> poison, i32 undef, i32 0401; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_1 = insertelement <2 x i32> poison, i32 undef, i32 1402; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = insertelement <4 x i32> poison, i32 undef, i32 %arg403; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_0 = insertelement <4 x i32> poison, i32 undef, i32 0404; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_3 = insertelement <4 x i32> poison, i32 undef, i32 3405; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_a = insertelement <8 x i32> poison, i32 undef, i32 %arg406; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_0 = insertelement <8 x i32> poison, i32 undef, i32 0407; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_3 = insertelement <8 x i32> poison, i32 undef, i32 3408; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_4 = insertelement <8 x i32> poison, i32 undef, i32 4409; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_7 = insertelement <8 x i32> poison, i32 undef, i32 7410; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_a = insertelement <16 x i32> poison, i32 undef, i32 %arg411; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i32_0 = insertelement <16 x i32> poison, i32 undef, i32 0412; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i32_3 = insertelement <16 x i32> poison, i32 undef, i32 3413; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i32_8 = insertelement <16 x i32> poison, i32 undef, i32 8414; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i32_15 = insertelement <16 x i32> poison, i32 undef, i32 15415; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef416;417 %v2i32_a = insertelement <2 x i32> poison, i32 undef, i32 %arg418 %v2i32_0 = insertelement <2 x i32> poison, i32 undef, i32 0419 %v2i32_1 = insertelement <2 x i32> poison, i32 undef, i32 1420 421 %v4i32_a = insertelement <4 x i32> poison, i32 undef, i32 %arg422 %v4i32_0 = insertelement <4 x i32> poison, i32 undef, i32 0423 %v4i32_3 = insertelement <4 x i32> poison, i32 undef, i32 3424 425 %v8i32_a = insertelement <8 x i32> poison, i32 undef, i32 %arg426 %v8i32_0 = insertelement <8 x i32> poison, i32 undef, i32 0427 %v8i32_3 = insertelement <8 x i32> poison, i32 undef, i32 3428 %v8i32_4 = insertelement <8 x i32> poison, i32 undef, i32 4429 %v8i32_7 = insertelement <8 x i32> poison, i32 undef, i32 7430 431 %v16i32_a = insertelement <16 x i32> poison, i32 undef, i32 %arg432 %v16i32_0 = insertelement <16 x i32> poison, i32 undef, i32 0433 %v16i32_3 = insertelement <16 x i32> poison, i32 undef, i32 3434 %v16i32_8 = insertelement <16 x i32> poison, i32 undef, i32 8435 %v16i32_15 = insertelement <16 x i32> poison, i32 undef, i32 15436 437 ret i32 undef438}439 440define i32 @insert_i16_poison(i32 %arg) {441; CI-LABEL: 'insert_i16_poison'442; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_a = insertelement <2 x i16> poison, i16 undef, i32 %arg443; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = insertelement <2 x i16> poison, i16 undef, i32 0444; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = insertelement <2 x i16> poison, i16 undef, i32 1445; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_a = insertelement <4 x i16> poison, i16 undef, i32 %arg446; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = insertelement <4 x i16> poison, i16 undef, i32 0447; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = insertelement <4 x i16> poison, i16 undef, i32 3448; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_a = insertelement <8 x i16> poison, i16 undef, i32 %arg449; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = insertelement <8 x i16> poison, i16 undef, i32 0450; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_7 = insertelement <8 x i16> poison, i16 undef, i32 7451; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_a = insertelement <16 x i16> poison, i16 undef, i32 %arg452; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = insertelement <16 x i16> poison, i16 undef, i32 0453; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_7 = insertelement <16 x i16> poison, i16 undef, i32 7454; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_8 = insertelement <16 x i16> poison, i16 undef, i32 8455; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_15 = insertelement <16 x i16> poison, i16 undef, i32 15456; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_a = insertelement <32 x i16> poison, i16 undef, i32 %arg457; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = insertelement <32 x i16> poison, i16 undef, i32 0458; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_7 = insertelement <32 x i16> poison, i16 undef, i32 7459; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_8 = insertelement <32 x i16> poison, i16 undef, i32 8460; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_15 = insertelement <32 x i16> poison, i16 undef, i32 15461; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_16 = insertelement <32 x i16> poison, i16 undef, i32 16462; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_24 = insertelement <32 x i16> poison, i16 undef, i32 24463; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_31 = insertelement <32 x i16> poison, i16 undef, i32 31464; CI-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef465;466; GFX89-LABEL: 'insert_i16_poison'467; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_a = insertelement <2 x i16> poison, i16 undef, i32 %arg468; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i16_0 = insertelement <2 x i16> poison, i16 undef, i32 0469; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = insertelement <2 x i16> poison, i16 undef, i32 1470; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_a = insertelement <4 x i16> poison, i16 undef, i32 %arg471; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i16_0 = insertelement <4 x i16> poison, i16 undef, i32 0472; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = insertelement <4 x i16> poison, i16 undef, i32 3473; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_a = insertelement <8 x i16> poison, i16 undef, i32 %arg474; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i16_0 = insertelement <8 x i16> poison, i16 undef, i32 0475; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_7 = insertelement <8 x i16> poison, i16 undef, i32 7476; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_a = insertelement <16 x i16> poison, i16 undef, i32 %arg477; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i16_0 = insertelement <16 x i16> poison, i16 undef, i32 0478; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_7 = insertelement <16 x i16> poison, i16 undef, i32 7479; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_8 = insertelement <16 x i16> poison, i16 undef, i32 8480; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_15 = insertelement <16 x i16> poison, i16 undef, i32 15481; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_a = insertelement <32 x i16> poison, i16 undef, i32 %arg482; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v32i16_0 = insertelement <32 x i16> poison, i16 undef, i32 0483; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_7 = insertelement <32 x i16> poison, i16 undef, i32 7484; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_8 = insertelement <32 x i16> poison, i16 undef, i32 8485; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_15 = insertelement <32 x i16> poison, i16 undef, i32 15486; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_16 = insertelement <32 x i16> poison, i16 undef, i32 16487; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_24 = insertelement <32 x i16> poison, i16 undef, i32 24488; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_31 = insertelement <32 x i16> poison, i16 undef, i32 31489; GFX89-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef490;491; CI-SIZE-LABEL: 'insert_i16_poison'492; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_a = insertelement <2 x i16> poison, i16 undef, i32 %arg493; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = insertelement <2 x i16> poison, i16 undef, i32 0494; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = insertelement <2 x i16> poison, i16 undef, i32 1495; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_a = insertelement <4 x i16> poison, i16 undef, i32 %arg496; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = insertelement <4 x i16> poison, i16 undef, i32 0497; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = insertelement <4 x i16> poison, i16 undef, i32 3498; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_a = insertelement <8 x i16> poison, i16 undef, i32 %arg499; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = insertelement <8 x i16> poison, i16 undef, i32 0500; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_7 = insertelement <8 x i16> poison, i16 undef, i32 7501; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_a = insertelement <16 x i16> poison, i16 undef, i32 %arg502; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = insertelement <16 x i16> poison, i16 undef, i32 0503; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_7 = insertelement <16 x i16> poison, i16 undef, i32 7504; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_8 = insertelement <16 x i16> poison, i16 undef, i32 8505; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_15 = insertelement <16 x i16> poison, i16 undef, i32 15506; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_a = insertelement <32 x i16> poison, i16 undef, i32 %arg507; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_0 = insertelement <32 x i16> poison, i16 undef, i32 0508; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_7 = insertelement <32 x i16> poison, i16 undef, i32 7509; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_8 = insertelement <32 x i16> poison, i16 undef, i32 8510; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_15 = insertelement <32 x i16> poison, i16 undef, i32 15511; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_16 = insertelement <32 x i16> poison, i16 undef, i32 16512; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_24 = insertelement <32 x i16> poison, i16 undef, i32 24513; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_31 = insertelement <32 x i16> poison, i16 undef, i32 31514; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef515;516; GFX89-SIZE-LABEL: 'insert_i16_poison'517; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_a = insertelement <2 x i16> poison, i16 undef, i32 %arg518; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i16_0 = insertelement <2 x i16> poison, i16 undef, i32 0519; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = insertelement <2 x i16> poison, i16 undef, i32 1520; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_a = insertelement <4 x i16> poison, i16 undef, i32 %arg521; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i16_0 = insertelement <4 x i16> poison, i16 undef, i32 0522; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = insertelement <4 x i16> poison, i16 undef, i32 3523; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_a = insertelement <8 x i16> poison, i16 undef, i32 %arg524; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i16_0 = insertelement <8 x i16> poison, i16 undef, i32 0525; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_7 = insertelement <8 x i16> poison, i16 undef, i32 7526; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_a = insertelement <16 x i16> poison, i16 undef, i32 %arg527; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v16i16_0 = insertelement <16 x i16> poison, i16 undef, i32 0528; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_7 = insertelement <16 x i16> poison, i16 undef, i32 7529; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_8 = insertelement <16 x i16> poison, i16 undef, i32 8530; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_15 = insertelement <16 x i16> poison, i16 undef, i32 15531; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_a = insertelement <32 x i16> poison, i16 undef, i32 %arg532; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v32i16_0 = insertelement <32 x i16> poison, i16 undef, i32 0533; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_7 = insertelement <32 x i16> poison, i16 undef, i32 7534; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_8 = insertelement <32 x i16> poison, i16 undef, i32 8535; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_15 = insertelement <32 x i16> poison, i16 undef, i32 15536; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_16 = insertelement <32 x i16> poison, i16 undef, i32 16537; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_24 = insertelement <32 x i16> poison, i16 undef, i32 24538; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i16_31 = insertelement <32 x i16> poison, i16 undef, i32 31539; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef540;541 %v2i16_a = insertelement <2 x i16> poison, i16 undef, i32 %arg542 %v2i16_0 = insertelement <2 x i16> poison, i16 undef, i32 0543 %v2i16_1 = insertelement <2 x i16> poison, i16 undef, i32 1544 545 %v4i16_a = insertelement <4 x i16> poison, i16 undef, i32 %arg546 %v4i16_0 = insertelement <4 x i16> poison, i16 undef, i32 0547 %v4i16_3 = insertelement <4 x i16> poison, i16 undef, i32 3548 549 %v8i16_a = insertelement <8 x i16> poison, i16 undef, i32 %arg550 %v8i16_0 = insertelement <8 x i16> poison, i16 undef, i32 0551 %v8i16_7 = insertelement <8 x i16> poison, i16 undef, i32 7552 553 %v16i16_a = insertelement <16 x i16> poison, i16 undef, i32 %arg554 %v16i16_0 = insertelement <16 x i16> poison, i16 undef, i32 0555 %v16i16_7 = insertelement <16 x i16> poison, i16 undef, i32 7556 %v16i16_8 = insertelement <16 x i16> poison, i16 undef, i32 8557 %v16i16_15 = insertelement <16 x i16> poison, i16 undef, i32 15558 559 %v32i16_a = insertelement <32 x i16> poison, i16 undef, i32 %arg560 %v32i16_0 = insertelement <32 x i16> poison, i16 undef, i32 0561 %v32i16_7 = insertelement <32 x i16> poison, i16 undef, i32 7562 %v32i16_8 = insertelement <32 x i16> poison, i16 undef, i32 8563 %v32i16_15 = insertelement <32 x i16> poison, i16 undef, i32 15564 %v32i16_16 = insertelement <32 x i16> poison, i16 undef, i32 16565 %v32i16_24 = insertelement <32 x i16> poison, i16 undef, i32 24566 %v32i16_31 = insertelement <32 x i16> poison, i16 undef, i32 31567 568 ret i32 undef569}570 571define i32 @insert_i8_poison(i32 %arg) {572; ALL-LABEL: 'insert_i8_poison'573; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_a = insertelement <2 x i8> poison, i8 undef, i32 %arg574; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> poison, i8 undef, i32 0575; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_3 = insertelement <2 x i8> poison, i8 undef, i32 1576; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_a = insertelement <4 x i8> poison, i8 undef, i32 %arg577; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> poison, i8 undef, i32 0578; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_3 = insertelement <4 x i8> poison, i8 undef, i32 3579; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_a = insertelement <8 x i8> poison, i8 undef, i32 %arg580; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = insertelement <8 x i8> poison, i8 undef, i32 0581; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_7 = insertelement <8 x i8> poison, i8 undef, i32 7582; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_a = insertelement <16 x i8> poison, i8 undef, i32 %arg583; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = insertelement <16 x i8> poison, i8 undef, i32 0584; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_8 = insertelement <16 x i8> poison, i8 undef, i32 8585; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_15 = insertelement <16 x i8> poison, i8 undef, i32 15586; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_a = insertelement <32 x i8> poison, i8 undef, i32 %arg587; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = insertelement <32 x i8> poison, i8 undef, i32 0588; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_7 = insertelement <32 x i8> poison, i8 undef, i32 7589; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_8 = insertelement <32 x i8> poison, i8 undef, i32 8590; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_15 = insertelement <32 x i8> poison, i8 undef, i32 15591; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_24 = insertelement <32 x i8> poison, i8 undef, i32 24592; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_31 = insertelement <32 x i8> poison, i8 undef, i32 31593; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_a = insertelement <64 x i8> poison, i8 undef, i32 %arg594; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = insertelement <64 x i8> poison, i8 undef, i32 0595; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_7 = insertelement <64 x i8> poison, i8 undef, i32 7596; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_8 = insertelement <64 x i8> poison, i8 undef, i32 8597; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_15 = insertelement <64 x i8> poison, i8 undef, i32 15598; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_24 = insertelement <64 x i8> poison, i8 undef, i32 24599; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_31 = insertelement <64 x i8> poison, i8 undef, i32 31600; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_32 = insertelement <64 x i8> poison, i8 undef, i32 32601; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_48 = insertelement <64 x i8> poison, i8 undef, i32 48602; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_63 = insertelement <64 x i8> poison, i8 undef, i32 63603; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef604;605; ALL-SIZE-LABEL: 'insert_i8_poison'606; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_a = insertelement <2 x i8> poison, i8 undef, i32 %arg607; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> poison, i8 undef, i32 0608; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_3 = insertelement <2 x i8> poison, i8 undef, i32 1609; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_a = insertelement <4 x i8> poison, i8 undef, i32 %arg610; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> poison, i8 undef, i32 0611; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_3 = insertelement <4 x i8> poison, i8 undef, i32 3612; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_a = insertelement <8 x i8> poison, i8 undef, i32 %arg613; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = insertelement <8 x i8> poison, i8 undef, i32 0614; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_7 = insertelement <8 x i8> poison, i8 undef, i32 7615; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_a = insertelement <16 x i8> poison, i8 undef, i32 %arg616; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = insertelement <16 x i8> poison, i8 undef, i32 0617; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_8 = insertelement <16 x i8> poison, i8 undef, i32 8618; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_15 = insertelement <16 x i8> poison, i8 undef, i32 15619; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_a = insertelement <32 x i8> poison, i8 undef, i32 %arg620; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_0 = insertelement <32 x i8> poison, i8 undef, i32 0621; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_7 = insertelement <32 x i8> poison, i8 undef, i32 7622; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_8 = insertelement <32 x i8> poison, i8 undef, i32 8623; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_15 = insertelement <32 x i8> poison, i8 undef, i32 15624; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_24 = insertelement <32 x i8> poison, i8 undef, i32 24625; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_31 = insertelement <32 x i8> poison, i8 undef, i32 31626; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_a = insertelement <64 x i8> poison, i8 undef, i32 %arg627; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_0 = insertelement <64 x i8> poison, i8 undef, i32 0628; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_7 = insertelement <64 x i8> poison, i8 undef, i32 7629; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_8 = insertelement <64 x i8> poison, i8 undef, i32 8630; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_15 = insertelement <64 x i8> poison, i8 undef, i32 15631; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_24 = insertelement <64 x i8> poison, i8 undef, i32 24632; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_31 = insertelement <64 x i8> poison, i8 undef, i32 31633; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_32 = insertelement <64 x i8> poison, i8 undef, i32 32634; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_48 = insertelement <64 x i8> poison, i8 undef, i32 48635; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i8_63 = insertelement <64 x i8> poison, i8 undef, i32 63636; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef637;638 %v2i8_a = insertelement <2 x i8> poison, i8 undef, i32 %arg639 %v2i8_0 = insertelement <2 x i8> poison, i8 undef, i32 0640 %v2i8_3 = insertelement <2 x i8> poison, i8 undef, i32 1641 642 %v4i8_a = insertelement <4 x i8> poison, i8 undef, i32 %arg643 %v4i8_0 = insertelement <4 x i8> poison, i8 undef, i32 0644 %v4i8_3 = insertelement <4 x i8> poison, i8 undef, i32 3645 646 %v8i8_a = insertelement <8 x i8> poison, i8 undef, i32 %arg647 %v8i8_0 = insertelement <8 x i8> poison, i8 undef, i32 0648 %v8i8_7 = insertelement <8 x i8> poison, i8 undef, i32 7649 650 %v16i8_a = insertelement <16 x i8> poison, i8 undef, i32 %arg651 %v16i8_0 = insertelement <16 x i8> poison, i8 undef, i32 0652 %v16i8_8 = insertelement <16 x i8> poison, i8 undef, i32 8653 %v16i8_15 = insertelement <16 x i8> poison, i8 undef, i32 15654 655 %v32i8_a = insertelement <32 x i8> poison, i8 undef, i32 %arg656 %v32i8_0 = insertelement <32 x i8> poison, i8 undef, i32 0657 %v32i8_7 = insertelement <32 x i8> poison, i8 undef, i32 7658 %v32i8_8 = insertelement <32 x i8> poison, i8 undef, i32 8659 %v32i8_15 = insertelement <32 x i8> poison, i8 undef, i32 15660 %v32i8_24 = insertelement <32 x i8> poison, i8 undef, i32 24661 %v32i8_31 = insertelement <32 x i8> poison, i8 undef, i32 31662 663 %v64i8_a = insertelement <64 x i8> poison, i8 undef, i32 %arg664 %v64i8_0 = insertelement <64 x i8> poison, i8 undef, i32 0665 %v64i8_7 = insertelement <64 x i8> poison, i8 undef, i32 7666 %v64i8_8 = insertelement <64 x i8> poison, i8 undef, i32 8667 %v64i8_15 = insertelement <64 x i8> poison, i8 undef, i32 15668 %v64i8_24 = insertelement <64 x i8> poison, i8 undef, i32 24669 %v64i8_31 = insertelement <64 x i8> poison, i8 undef, i32 31670 %v64i8_32 = insertelement <64 x i8> poison, i8 undef, i32 32671 %v64i8_48 = insertelement <64 x i8> poison, i8 undef, i32 48672 %v64i8_63 = insertelement <64 x i8> poison, i8 undef, i32 63673 674 ret i32 undef675}676 677define i32 @insert_i1_poison(i32 %arg) {678; ALL-LABEL: 'insert_i1_poison'679; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_a = insertelement <2 x i1> poison, i1 undef, i32 %arg680; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_0 = insertelement <2 x i1> poison, i1 undef, i32 0681; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_1 = insertelement <2 x i1> poison, i1 undef, i32 1682; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_a = insertelement <4 x i1> poison, i1 undef, i32 %arg683; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_0 = insertelement <4 x i1> poison, i1 undef, i32 0684; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_2 = insertelement <4 x i1> poison, i1 undef, i32 2685; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_a = insertelement <8 x i1> poison, i1 undef, i32 %arg686; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_0 = insertelement <8 x i1> poison, i1 undef, i32 0687; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_4 = insertelement <8 x i1> poison, i1 undef, i32 4688; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_a = insertelement <16 x i1> poison, i1 undef, i32 %arg689; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_0 = insertelement <16 x i1> poison, i1 undef, i32 0690; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_8 = insertelement <16 x i1> poison, i1 undef, i32 8691; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_15 = insertelement <16 x i1> poison, i1 undef, i32 15692; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_a = insertelement <32 x i1> poison, i1 undef, i32 %arg693; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_0 = insertelement <32 x i1> poison, i1 undef, i32 0694; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_7 = insertelement <32 x i1> poison, i1 undef, i32 7695; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_8 = insertelement <32 x i1> poison, i1 undef, i32 8696; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_15 = insertelement <32 x i1> poison, i1 undef, i32 15697; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_24 = insertelement <32 x i1> poison, i1 undef, i32 24698; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_31 = insertelement <32 x i1> poison, i1 undef, i32 31699; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_a = insertelement <64 x i1> poison, i1 undef, i32 %arg700; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_0 = insertelement <64 x i1> poison, i1 undef, i32 0701; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_7 = insertelement <64 x i1> poison, i1 undef, i32 7702; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_8 = insertelement <64 x i1> poison, i1 undef, i32 8703; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_15 = insertelement <64 x i1> poison, i1 undef, i32 15704; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_24 = insertelement <64 x i1> poison, i1 undef, i32 24705; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_31 = insertelement <64 x i1> poison, i1 undef, i32 31706; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_32 = insertelement <64 x i1> poison, i1 undef, i32 32707; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_48 = insertelement <64 x i1> poison, i1 undef, i32 48708; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_63 = insertelement <64 x i1> poison, i1 undef, i32 63709; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret i32 undef710;711; ALL-SIZE-LABEL: 'insert_i1_poison'712; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_a = insertelement <2 x i1> poison, i1 undef, i32 %arg713; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_0 = insertelement <2 x i1> poison, i1 undef, i32 0714; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_1 = insertelement <2 x i1> poison, i1 undef, i32 1715; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_a = insertelement <4 x i1> poison, i1 undef, i32 %arg716; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_0 = insertelement <4 x i1> poison, i1 undef, i32 0717; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_2 = insertelement <4 x i1> poison, i1 undef, i32 2718; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_a = insertelement <8 x i1> poison, i1 undef, i32 %arg719; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_0 = insertelement <8 x i1> poison, i1 undef, i32 0720; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_4 = insertelement <8 x i1> poison, i1 undef, i32 4721; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_a = insertelement <16 x i1> poison, i1 undef, i32 %arg722; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_0 = insertelement <16 x i1> poison, i1 undef, i32 0723; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_8 = insertelement <16 x i1> poison, i1 undef, i32 8724; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_15 = insertelement <16 x i1> poison, i1 undef, i32 15725; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_a = insertelement <32 x i1> poison, i1 undef, i32 %arg726; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_0 = insertelement <32 x i1> poison, i1 undef, i32 0727; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_7 = insertelement <32 x i1> poison, i1 undef, i32 7728; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_8 = insertelement <32 x i1> poison, i1 undef, i32 8729; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_15 = insertelement <32 x i1> poison, i1 undef, i32 15730; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_24 = insertelement <32 x i1> poison, i1 undef, i32 24731; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_31 = insertelement <32 x i1> poison, i1 undef, i32 31732; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_a = insertelement <64 x i1> poison, i1 undef, i32 %arg733; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_0 = insertelement <64 x i1> poison, i1 undef, i32 0734; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_7 = insertelement <64 x i1> poison, i1 undef, i32 7735; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_8 = insertelement <64 x i1> poison, i1 undef, i32 8736; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_15 = insertelement <64 x i1> poison, i1 undef, i32 15737; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_24 = insertelement <64 x i1> poison, i1 undef, i32 24738; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_31 = insertelement <64 x i1> poison, i1 undef, i32 31739; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_32 = insertelement <64 x i1> poison, i1 undef, i32 32740; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_48 = insertelement <64 x i1> poison, i1 undef, i32 48741; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i1_63 = insertelement <64 x i1> poison, i1 undef, i32 63742; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef743;744 %v2i1_a = insertelement <2 x i1> poison, i1 undef, i32 %arg745 %v2i1_0 = insertelement <2 x i1> poison, i1 undef, i32 0746 %v2i1_1 = insertelement <2 x i1> poison, i1 undef, i32 1747 748 %v4i1_a = insertelement <4 x i1> poison, i1 undef, i32 %arg749 %v4i1_0 = insertelement <4 x i1> poison, i1 undef, i32 0750 %v4i1_2 = insertelement <4 x i1> poison, i1 undef, i32 2751 752 %v8i1_a = insertelement <8 x i1> poison, i1 undef, i32 %arg753 %v8i1_0 = insertelement <8 x i1> poison, i1 undef, i32 0754 %v8i1_4 = insertelement <8 x i1> poison, i1 undef, i32 4755 756 %v16i1_a = insertelement <16 x i1> poison, i1 undef, i32 %arg757 %v16i1_0 = insertelement <16 x i1> poison, i1 undef, i32 0758 %v16i1_8 = insertelement <16 x i1> poison, i1 undef, i32 8759 %v16i1_15 = insertelement <16 x i1> poison, i1 undef, i32 15760 761 %v32i1_a = insertelement <32 x i1> poison, i1 undef, i32 %arg762 %v32i1_0 = insertelement <32 x i1> poison, i1 undef, i32 0763 %v32i1_7 = insertelement <32 x i1> poison, i1 undef, i32 7764 %v32i1_8 = insertelement <32 x i1> poison, i1 undef, i32 8765 %v32i1_15 = insertelement <32 x i1> poison, i1 undef, i32 15766 %v32i1_24 = insertelement <32 x i1> poison, i1 undef, i32 24767 %v32i1_31 = insertelement <32 x i1> poison, i1 undef, i32 31768 769 %v64i1_a = insertelement <64 x i1> poison, i1 undef, i32 %arg770 %v64i1_0 = insertelement <64 x i1> poison, i1 undef, i32 0771 %v64i1_7 = insertelement <64 x i1> poison, i1 undef, i32 7772 %v64i1_8 = insertelement <64 x i1> poison, i1 undef, i32 8773 %v64i1_15 = insertelement <64 x i1> poison, i1 undef, i32 15774 %v64i1_24 = insertelement <64 x i1> poison, i1 undef, i32 24775 %v64i1_31 = insertelement <64 x i1> poison, i1 undef, i32 31776 %v64i1_32 = insertelement <64 x i1> poison, i1 undef, i32 32777 %v64i1_48 = insertelement <64 x i1> poison, i1 undef, i32 48778 %v64i1_63 = insertelement <64 x i1> poison, i1 undef, i32 63779 780 ret i32 undef781}782