373 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=GCN,CI %s3; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=fiji %s | FileCheck -check-prefixes=GCN,GFX89 %s4; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 %s | FileCheck -check-prefixes=GCN,GFX89 %s5; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa %s | FileCheck -check-prefixes=GCN-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=GCN-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=GCN-SIZE,GFX89-SIZE %s8; END.9 10define amdgpu_kernel void @extractelement_32(i32 %arg) {11; GCN-LABEL: 'extractelement_32'12; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 013; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_0 = extractelement <2 x float> undef, i32 014; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_0 = extractelement <3 x i32> undef, i32 015; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 016; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_0 = extractelement <5 x i32> undef, i32 017; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 018; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 119; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_1 = extractelement <2 x float> undef, i32 120; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_1 = extractelement <3 x i32> undef, i32 121; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_1 = extractelement <4 x i32> undef, i32 122; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_1 = extractelement <5 x i32> undef, i32 123; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_1 = extractelement <8 x i32> undef, i32 124; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_2 = extractelement <3 x i32> undef, i32 225; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_2 = extractelement <4 x i32> undef, i32 226; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_2 = extractelement <5 x i32> undef, i32 227; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_2 = extractelement <8 x i32> undef, i32 228; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_3 = extractelement <4 x i32> undef, i32 329; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_3 = extractelement <5 x i32> undef, i32 330; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_3 = extractelement <8 x i32> undef, i32 331; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = extractelement <2 x i32> undef, i32 %arg32; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = extractelement <4 x i32> undef, i32 %arg33; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_a = extractelement <8 x i32> undef, i32 %arg34; GCN-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void35;36; GCN-SIZE-LABEL: 'extractelement_32'37; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 038; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_0 = extractelement <2 x float> undef, i32 039; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_0 = extractelement <3 x i32> undef, i32 040; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 041; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_0 = extractelement <5 x i32> undef, i32 042; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 043; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 144; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_1 = extractelement <2 x float> undef, i32 145; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_1 = extractelement <3 x i32> undef, i32 146; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_1 = extractelement <4 x i32> undef, i32 147; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_1 = extractelement <5 x i32> undef, i32 148; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_1 = extractelement <8 x i32> undef, i32 149; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i32_2 = extractelement <3 x i32> undef, i32 250; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_2 = extractelement <4 x i32> undef, i32 251; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_2 = extractelement <5 x i32> undef, i32 252; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_2 = extractelement <8 x i32> undef, i32 253; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i32_3 = extractelement <4 x i32> undef, i32 354; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i32_3 = extractelement <5 x i32> undef, i32 355; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i32_3 = extractelement <8 x i32> undef, i32 356; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_a = extractelement <2 x i32> undef, i32 %arg57; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_a = extractelement <4 x i32> undef, i32 %arg58; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_a = extractelement <8 x i32> undef, i32 %arg59; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void60;61 %v2i32_0 = extractelement <2 x i32> undef, i32 062 %v2f32_0 = extractelement <2 x float> undef, i32 063 %v3i32_0 = extractelement <3 x i32> undef, i32 064 %v4i32_0 = extractelement <4 x i32> undef, i32 065 %v5i32_0 = extractelement <5 x i32> undef, i32 066 %v8i32_0 = extractelement <8 x i32> undef, i32 067 68 %v2i32_1 = extractelement <2 x i32> undef, i32 169 %v2f32_1 = extractelement <2 x float> undef, i32 170 %v3i32_1 = extractelement <3 x i32> undef, i32 171 %v4i32_1 = extractelement <4 x i32> undef, i32 172 %v5i32_1 = extractelement <5 x i32> undef, i32 173 %v8i32_1 = extractelement <8 x i32> undef, i32 174 75 %v3i32_2 = extractelement <3 x i32> undef, i32 276 %v4i32_2 = extractelement <4 x i32> undef, i32 277 %v5i32_2 = extractelement <5 x i32> undef, i32 278 %v8i32_2 = extractelement <8 x i32> undef, i32 279 80 %v4i32_3 = extractelement <4 x i32> undef, i32 381 %v5i32_3 = extractelement <5 x i32> undef, i32 382 %v8i32_3 = extractelement <8 x i32> undef, i32 383 84 %v2i32_a = extractelement <2 x i32> undef, i32 %arg85 %v4i32_a = extractelement <4 x i32> undef, i32 %arg86 %v8i32_a = extractelement <8 x i32> undef, i32 %arg87 ret void88}89 90define amdgpu_kernel void @extractelement_64(i32 %arg) {91; GCN-LABEL: 'extractelement_64'92; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 093; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_0 = extractelement <2 x double> undef, i32 094; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_0 = extractelement <3 x i64> undef, i32 095; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 096; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_0 = extractelement <5 x i64> undef, i32 097; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 098; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 199; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_1 = extractelement <2 x double> undef, i32 1100; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_1 = extractelement <3 x i64> undef, i32 1101; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_1 = extractelement <4 x i64> undef, i32 1102; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_1 = extractelement <5 x i64> undef, i32 1103; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_1 = extractelement <8 x i64> undef, i32 1104; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_2 = extractelement <3 x i64> undef, i32 2105; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_2 = extractelement <4 x i64> undef, i32 2106; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_2 = extractelement <5 x i64> undef, i32 2107; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_2 = extractelement <8 x i64> undef, i32 2108; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_3 = extractelement <4 x i64> undef, i32 3109; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_3 = extractelement <5 x i64> undef, i32 3110; GCN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_3 = extractelement <8 x i64> undef, i32 3111; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = extractelement <2 x i64> undef, i32 %arg112; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_a = extractelement <4 x i64> undef, i32 %arg113; GCN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_a = extractelement <8 x i64> undef, i32 %arg114; GCN-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void115;116; GCN-SIZE-LABEL: 'extractelement_64'117; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0118; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_0 = extractelement <2 x double> undef, i32 0119; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_0 = extractelement <3 x i64> undef, i32 0120; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0121; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_0 = extractelement <5 x i64> undef, i32 0122; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0123; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1124; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_1 = extractelement <2 x double> undef, i32 1125; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_1 = extractelement <3 x i64> undef, i32 1126; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_1 = extractelement <4 x i64> undef, i32 1127; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_1 = extractelement <5 x i64> undef, i32 1128; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_1 = extractelement <8 x i64> undef, i32 1129; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i64_2 = extractelement <3 x i64> undef, i32 2130; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_2 = extractelement <4 x i64> undef, i32 2131; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_2 = extractelement <5 x i64> undef, i32 2132; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_2 = extractelement <8 x i64> undef, i32 2133; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i64_3 = extractelement <4 x i64> undef, i32 3134; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i64_3 = extractelement <5 x i64> undef, i32 3135; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i64_3 = extractelement <8 x i64> undef, i32 3136; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_a = extractelement <2 x i64> undef, i32 %arg137; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_a = extractelement <4 x i64> undef, i32 %arg138; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_a = extractelement <8 x i64> undef, i32 %arg139; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void140;141 %v2i64_0 = extractelement <2 x i64> undef, i32 0142 %v2f64_0 = extractelement <2 x double> undef, i32 0143 %v3i64_0 = extractelement <3 x i64> undef, i32 0144 %v4i64_0 = extractelement <4 x i64> undef, i32 0145 %v5i64_0 = extractelement <5 x i64> undef, i32 0146 %v8i64_0 = extractelement <8 x i64> undef, i32 0147 148 %v2i64_1 = extractelement <2 x i64> undef, i32 1149 %v2f64_1 = extractelement <2 x double> undef, i32 1150 %v3i64_1 = extractelement <3 x i64> undef, i32 1151 %v4i64_1 = extractelement <4 x i64> undef, i32 1152 %v5i64_1 = extractelement <5 x i64> undef, i32 1153 %v8i64_1 = extractelement <8 x i64> undef, i32 1154 155 %v3i64_2 = extractelement <3 x i64> undef, i32 2156 %v4i64_2 = extractelement <4 x i64> undef, i32 2157 %v5i64_2 = extractelement <5 x i64> undef, i32 2158 %v8i64_2 = extractelement <8 x i64> undef, i32 2159 160 %v4i64_3 = extractelement <4 x i64> undef, i32 3161 %v5i64_3 = extractelement <5 x i64> undef, i32 3162 %v8i64_3 = extractelement <8 x i64> undef, i32 3163 164 %v2i64_a = extractelement <2 x i64> undef, i32 %arg165 %v4i64_a = extractelement <4 x i64> undef, i32 %arg166 %v8i64_a = extractelement <8 x i64> undef, i32 %arg167 ret void168}169 170define amdgpu_kernel void @extractelement_8(i32 %arg) {171; GCN-LABEL: 'extractelement_8'172; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0173; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_0 = extractelement <3 x i8> undef, i32 0174; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0175; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_0 = extractelement <5 x i8> undef, i32 0176; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0177; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1178; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_1 = extractelement <3 x i8> undef, i32 1179; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_1 = extractelement <4 x i8> undef, i32 1180; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_1 = extractelement <5 x i8> undef, i32 1181; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_1 = extractelement <8 x i8> undef, i32 1182; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_2 = extractelement <3 x i8> undef, i32 2183; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_2 = extractelement <4 x i8> undef, i32 2184; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_2 = extractelement <5 x i8> undef, i32 2185; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_2 = extractelement <8 x i8> undef, i32 2186; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_3 = extractelement <4 x i8> undef, i32 3187; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_3 = extractelement <5 x i8> undef, i32 3188; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_3 = extractelement <8 x i8> undef, i32 3189; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_a = extractelement <2 x i8> undef, i32 %arg190; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_a = extractelement <4 x i8> undef, i32 %arg191; GCN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_a = extractelement <8 x i8> undef, i32 %arg192; GCN-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void193;194; GCN-SIZE-LABEL: 'extractelement_8'195; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0196; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_0 = extractelement <3 x i8> undef, i32 0197; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0198; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_0 = extractelement <5 x i8> undef, i32 0199; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0200; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1201; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_1 = extractelement <3 x i8> undef, i32 1202; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_1 = extractelement <4 x i8> undef, i32 1203; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_1 = extractelement <5 x i8> undef, i32 1204; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_1 = extractelement <8 x i8> undef, i32 1205; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i8_2 = extractelement <3 x i8> undef, i32 2206; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_2 = extractelement <4 x i8> undef, i32 2207; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_2 = extractelement <5 x i8> undef, i32 2208; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_2 = extractelement <8 x i8> undef, i32 2209; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_3 = extractelement <4 x i8> undef, i32 3210; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i8_3 = extractelement <5 x i8> undef, i32 3211; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_3 = extractelement <8 x i8> undef, i32 3212; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_a = extractelement <2 x i8> undef, i32 %arg213; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_a = extractelement <4 x i8> undef, i32 %arg214; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_a = extractelement <8 x i8> undef, i32 %arg215; GCN-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void216;217 %v2i8_0 = extractelement <2 x i8> undef, i32 0218 %v3i8_0 = extractelement <3 x i8> undef, i32 0219 %v4i8_0 = extractelement <4 x i8> undef, i32 0220 %v5i8_0 = extractelement <5 x i8> undef, i32 0221 %v8i8_0 = extractelement <8 x i8> undef, i32 0222 223 %v2i8_1 = extractelement <2 x i8> undef, i32 1224 %v3i8_1 = extractelement <3 x i8> undef, i32 1225 %v4i8_1 = extractelement <4 x i8> undef, i32 1226 %v5i8_1 = extractelement <5 x i8> undef, i32 1227 %v8i8_1 = extractelement <8 x i8> undef, i32 1228 229 %v3i8_2 = extractelement <3 x i8> undef, i32 2230 %v4i8_2 = extractelement <4 x i8> undef, i32 2231 %v5i8_2 = extractelement <5 x i8> undef, i32 2232 %v8i8_2 = extractelement <8 x i8> undef, i32 2233 234 %v4i8_3 = extractelement <4 x i8> undef, i32 3235 %v5i8_3 = extractelement <5 x i8> undef, i32 3236 %v8i8_3 = extractelement <8 x i8> undef, i32 3237 238 %v2i8_a = extractelement <2 x i8> undef, i32 %arg239 %v4i8_a = extractelement <4 x i8> undef, i32 %arg240 %v8i8_a = extractelement <8 x i8> undef, i32 %arg241 ret void242}243 244define amdgpu_kernel void @extractelement_16(i32 %arg) {245; CI-LABEL: 'extractelement_16'246; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0247; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_0 = extractelement <2 x half> undef, i32 0248; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_0 = extractelement <3 x i16> undef, i32 0249; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0250; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_0 = extractelement <5 x i16> undef, i32 0251; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0252; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1253; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_1 = extractelement <2 x half> undef, i32 1254; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_1 = extractelement <3 x i16> undef, i32 1255; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = extractelement <4 x i16> undef, i32 1256; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_1 = extractelement <5 x i16> undef, i32 1257; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_1 = extractelement <8 x i16> undef, i32 1258; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_2 = extractelement <3 x i16> undef, i32 2259; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_2 = extractelement <4 x i16> undef, i32 2260; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_2 = extractelement <5 x i16> undef, i32 2261; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_2 = extractelement <8 x i16> undef, i32 2262; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> undef, i32 3263; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_3 = extractelement <5 x i16> undef, i32 3264; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_3 = extractelement <8 x i16> undef, i32 3265; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_a = extractelement <2 x i16> undef, i32 %arg266; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_a = extractelement <4 x i16> undef, i32 %arg267; CI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_a = extractelement <8 x i16> undef, i32 %arg268; CI-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void269;270; GFX89-LABEL: 'extractelement_16'271; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0272; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f16_0 = extractelement <2 x half> undef, i32 0273; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i16_0 = extractelement <3 x i16> undef, i32 0274; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0275; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i16_0 = extractelement <5 x i16> undef, i32 0276; GFX89-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0277; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1278; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_1 = extractelement <2 x half> undef, i32 1279; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_1 = extractelement <3 x i16> undef, i32 1280; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = extractelement <4 x i16> undef, i32 1281; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_1 = extractelement <5 x i16> undef, i32 1282; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_1 = extractelement <8 x i16> undef, i32 1283; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_2 = extractelement <3 x i16> undef, i32 2284; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_2 = extractelement <4 x i16> undef, i32 2285; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_2 = extractelement <5 x i16> undef, i32 2286; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_2 = extractelement <8 x i16> undef, i32 2287; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> undef, i32 3288; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_3 = extractelement <5 x i16> undef, i32 3289; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_3 = extractelement <8 x i16> undef, i32 3290; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_a = extractelement <2 x i16> undef, i32 %arg291; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_a = extractelement <4 x i16> undef, i32 %arg292; GFX89-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_a = extractelement <8 x i16> undef, i32 %arg293; GFX89-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void294;295; CI-SIZE-LABEL: 'extractelement_16'296; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0297; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_0 = extractelement <2 x half> undef, i32 0298; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_0 = extractelement <3 x i16> undef, i32 0299; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0300; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_0 = extractelement <5 x i16> undef, i32 0301; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0302; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1303; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_1 = extractelement <2 x half> undef, i32 1304; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_1 = extractelement <3 x i16> undef, i32 1305; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = extractelement <4 x i16> undef, i32 1306; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_1 = extractelement <5 x i16> undef, i32 1307; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_1 = extractelement <8 x i16> undef, i32 1308; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_2 = extractelement <3 x i16> undef, i32 2309; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_2 = extractelement <4 x i16> undef, i32 2310; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_2 = extractelement <5 x i16> undef, i32 2311; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_2 = extractelement <8 x i16> undef, i32 2312; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> undef, i32 3313; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_3 = extractelement <5 x i16> undef, i32 3314; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_3 = extractelement <8 x i16> undef, i32 3315; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_a = extractelement <2 x i16> undef, i32 %arg316; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_a = extractelement <4 x i16> undef, i32 %arg317; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_a = extractelement <8 x i16> undef, i32 %arg318; CI-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void319;320; GFX89-SIZE-LABEL: 'extractelement_16'321; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0322; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f16_0 = extractelement <2 x half> undef, i32 0323; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v3i16_0 = extractelement <3 x i16> undef, i32 0324; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0325; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v5i16_0 = extractelement <5 x i16> undef, i32 0326; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0327; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1328; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_1 = extractelement <2 x half> undef, i32 1329; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_1 = extractelement <3 x i16> undef, i32 1330; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = extractelement <4 x i16> undef, i32 1331; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_1 = extractelement <5 x i16> undef, i32 1332; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_1 = extractelement <8 x i16> undef, i32 1333; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3i16_2 = extractelement <3 x i16> undef, i32 2334; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_2 = extractelement <4 x i16> undef, i32 2335; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_2 = extractelement <5 x i16> undef, i32 2336; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_2 = extractelement <8 x i16> undef, i32 2337; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_3 = extractelement <4 x i16> undef, i32 3338; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5i16_3 = extractelement <5 x i16> undef, i32 3339; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_3 = extractelement <8 x i16> undef, i32 3340; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_a = extractelement <2 x i16> undef, i32 %arg341; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_a = extractelement <4 x i16> undef, i32 %arg342; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_a = extractelement <8 x i16> undef, i32 %arg343; GFX89-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void344;345 %v2i16_0 = extractelement <2 x i16> undef, i32 0346 %v2f16_0 = extractelement <2 x half> undef, i32 0347 %v3i16_0 = extractelement <3 x i16> undef, i32 0348 %v4i16_0 = extractelement <4 x i16> undef, i32 0349 %v5i16_0 = extractelement <5 x i16> undef, i32 0350 %v8i16_0 = extractelement <8 x i16> undef, i32 0351 352 %v2i16_1 = extractelement <2 x i16> undef, i32 1353 %v2f16_1 = extractelement <2 x half> undef, i32 1354 %v3i16_1 = extractelement <3 x i16> undef, i32 1355 %v4i16_1 = extractelement <4 x i16> undef, i32 1356 %v5i16_1 = extractelement <5 x i16> undef, i32 1357 %v8i16_1 = extractelement <8 x i16> undef, i32 1358 359 %v3i16_2 = extractelement <3 x i16> undef, i32 2360 %v4i16_2 = extractelement <4 x i16> undef, i32 2361 %v5i16_2 = extractelement <5 x i16> undef, i32 2362 %v8i16_2 = extractelement <8 x i16> undef, i32 2363 364 %v4i16_3 = extractelement <4 x i16> undef, i32 3365 %v5i16_3 = extractelement <5 x i16> undef, i32 3366 %v8i16_3 = extractelement <8 x i16> undef, i32 3367 368 %v2i16_a = extractelement <2 x i16> undef, i32 %arg369 %v4i16_a = extractelement <4 x i16> undef, i32 %arg370 %v8i16_a = extractelement <8 x i16> undef, i32 %arg371 ret void372}373