423 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=+vsx | FileCheck --check-prefix=CHECK-P7 %s3; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 -mattr=+vsx | FileCheck --check-prefix=CHECK-P8LE %s4; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr9 -mattr=+vsx | FileCheck --check-prefix=CHECK-P9BE %s5; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 -mattr=+vsx | FileCheck --check-prefix=CHECK-P9LE %s6; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr10 -mattr=+vsx | FileCheck --check-prefix=CHECK-P10 %s7 8target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"9target triple = "powerpc64-unknown-linux-gnu"10 11define i32 @insert(i32 %arg) {12 ; CHECK: cost of 10 {{.*}} insertelement13; CHECK-P7-LABEL: 'insert'14; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <4 x i32> undef, i32 %arg, i32 015; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef16;17; CHECK-P8LE-LABEL: 'insert'18; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = insertelement <4 x i32> undef, i32 %arg, i32 019; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef20;21; CHECK-P9BE-LABEL: 'insert'22; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %x = insertelement <4 x i32> undef, i32 %arg, i32 023; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef24;25; CHECK-P9LE-LABEL: 'insert'26; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %x = insertelement <4 x i32> undef, i32 %arg, i32 027; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef28;29; CHECK-P10-LABEL: 'insert'30; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = insertelement <4 x i32> undef, i32 %arg, i32 031; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef32;33 %x = insertelement <4 x i32> undef, i32 %arg, i32 034 ret i32 undef35}36 37define i32 @extract(<4 x i32> %arg) {38 ; CHECK: cost of 3 {{.*}} extractelement39; CHECK-P7-LABEL: 'extract'40; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <4 x i32> %arg, i32 041; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x42;43; CHECK-P8LE-LABEL: 'extract'44; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <4 x i32> %arg, i32 045; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x46;47; CHECK-P9BE-LABEL: 'extract'48; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = extractelement <4 x i32> %arg, i32 049; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x50;51; CHECK-P9LE-LABEL: 'extract'52; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = extractelement <4 x i32> %arg, i32 053; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x54;55; CHECK-P10-LABEL: 'extract'56; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %x = extractelement <4 x i32> %arg, i32 057; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x58;59 %x = extractelement <4 x i32> %arg, i32 060 ret i32 %x61}62 63define void @test2xdouble(<2 x double> %arg1) {64; CHECK-P7-LABEL: 'test2xdouble'65; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = extractelement <2 x double> %arg1, i32 066; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = extractelement <2 x double> %arg1, i32 167; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void68;69; CHECK-P8LE-LABEL: 'test2xdouble'70; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v1 = extractelement <2 x double> %arg1, i32 071; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement <2 x double> %arg1, i32 172; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void73;74; CHECK-P9BE-LABEL: 'test2xdouble'75; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v1 = extractelement <2 x double> %arg1, i32 076; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2 = extractelement <2 x double> %arg1, i32 177; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void78;79; CHECK-P9LE-LABEL: 'test2xdouble'80; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v1 = extractelement <2 x double> %arg1, i32 081; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement <2 x double> %arg1, i32 182; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void83;84; CHECK-P10-LABEL: 'test2xdouble'85; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v1 = extractelement <2 x double> %arg1, i32 086; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement <2 x double> %arg1, i32 187; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void88;89 %v1 = extractelement <2 x double> %arg1, i32 090 %v2 = extractelement <2 x double> %arg1, i32 191 ret void92}93 94define void @test4xi32(<4 x i32> %v1, i32 %x1) {95; CHECK-P7-LABEL: 'test4xi32'96; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 297; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void98;99; CHECK-P8LE-LABEL: 'test4xi32'100; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 2101; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void102;103; CHECK-P9BE-LABEL: 'test4xi32'104; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 2105; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void106;107; CHECK-P9LE-LABEL: 'test4xi32'108; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 2109; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void110;111; CHECK-P10-LABEL: 'test4xi32'112; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 2113; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void114;115 %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 2116 ret void117}118 119define void @vexti32(<4 x i32> %p1) {120; CHECK-P7-LABEL: 'vexti32'121; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i1 = extractelement <4 x i32> %p1, i32 0122; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i2 = extractelement <4 x i32> %p1, i32 1123; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i3 = extractelement <4 x i32> %p1, i32 2124; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i4 = extractelement <4 x i32> %p1, i32 3125; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void126;127; CHECK-P8LE-LABEL: 'vexti32'128; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i1 = extractelement <4 x i32> %p1, i32 0129; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i2 = extractelement <4 x i32> %p1, i32 1130; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i3 = extractelement <4 x i32> %p1, i32 2131; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i4 = extractelement <4 x i32> %p1, i32 3132; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void133;134; CHECK-P9BE-LABEL: 'vexti32'135; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i1 = extractelement <4 x i32> %p1, i32 0136; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <4 x i32> %p1, i32 1137; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i3 = extractelement <4 x i32> %p1, i32 2138; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i4 = extractelement <4 x i32> %p1, i32 3139; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void140;141; CHECK-P9LE-LABEL: 'vexti32'142; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i1 = extractelement <4 x i32> %p1, i32 0143; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i2 = extractelement <4 x i32> %p1, i32 1144; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i3 = extractelement <4 x i32> %p1, i32 2145; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i4 = extractelement <4 x i32> %p1, i32 3146; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void147;148; CHECK-P10-LABEL: 'vexti32'149; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i1 = extractelement <4 x i32> %p1, i32 0150; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <4 x i32> %p1, i32 1151; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i3 = extractelement <4 x i32> %p1, i32 2152; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = extractelement <4 x i32> %p1, i32 3153; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void154;155 %i1 = extractelement <4 x i32> %p1, i32 0156 %i2 = extractelement <4 x i32> %p1, i32 1157 %i3 = extractelement <4 x i32> %p1, i32 2158 %i4 = extractelement <4 x i32> %p1, i32 3159 ret void160}161 162define void @vexti64(<2 x i64> %p1) {163; CHECK-P7-LABEL: 'vexti64'164; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i1 = extractelement <2 x i64> %p1, i32 0165; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i2 = extractelement <2 x i64> %p1, i32 1166; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void167;168; CHECK-P8LE-LABEL: 'vexti64'169; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i1 = extractelement <2 x i64> %p1, i32 0170; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i2 = extractelement <2 x i64> %p1, i32 1171; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void172;173; CHECK-P9BE-LABEL: 'vexti64'174; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i1 = extractelement <2 x i64> %p1, i32 0175; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <2 x i64> %p1, i32 1176; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void177;178; CHECK-P9LE-LABEL: 'vexti64'179; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i1 = extractelement <2 x i64> %p1, i32 0180; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <2 x i64> %p1, i32 1181; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void182;183; CHECK-P10-LABEL: 'vexti64'184; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i1 = extractelement <2 x i64> %p1, i32 0185; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <2 x i64> %p1, i32 1186; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void187;188 %i1 = extractelement <2 x i64> %p1, i32 0189 %i2 = extractelement <2 x i64> %p1, i32 1190 ret void191}192 193define void @vext(<8 x i16> %p1, <16 x i8> %p2) {194; CHECK-P7-LABEL: 'vext'195; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i1 = extractelement <8 x i16> %p1, i32 0196; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i2 = extractelement <16 x i8> %p2, i32 0197; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void198;199; CHECK-P8LE-LABEL: 'vext'200; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i1 = extractelement <8 x i16> %p1, i32 0201; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %i2 = extractelement <16 x i8> %p2, i32 0202; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void203;204; CHECK-P9BE-LABEL: 'vext'205; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i1 = extractelement <8 x i16> %p1, i32 0206; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i2 = extractelement <16 x i8> %p2, i32 0207; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void208;209; CHECK-P9LE-LABEL: 'vext'210; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i1 = extractelement <8 x i16> %p1, i32 0211; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i2 = extractelement <16 x i8> %p2, i32 0212; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void213;214; CHECK-P10-LABEL: 'vext'215; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i1 = extractelement <8 x i16> %p1, i32 0216; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <16 x i8> %p2, i32 0217; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void218;219 %i1 = extractelement <8 x i16> %p1, i32 0220 %i2 = extractelement <16 x i8> %p2, i32 0221 ret void222}223 224define <2 x i64> @insert_i64_x(<2 x i64> %dest, i64 %arg, i32 %idx) {225; CHECK-P7-LABEL: 'insert_i64_x'226; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <2 x i64> %dest, i64 %arg, i32 %idx227; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %x228;229; CHECK-P8LE-LABEL: 'insert_i64_x'230; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <2 x i64> %dest, i64 %arg, i32 %idx231; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %x232;233; CHECK-P9BE-LABEL: 'insert_i64_x'234; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <2 x i64> %dest, i64 %arg, i32 %idx235; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %x236;237; CHECK-P9LE-LABEL: 'insert_i64_x'238; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <2 x i64> %dest, i64 %arg, i32 %idx239; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %x240;241; CHECK-P10-LABEL: 'insert_i64_x'242; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = insertelement <2 x i64> %dest, i64 %arg, i32 %idx243; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %x244;245 %x = insertelement <2 x i64> %dest, i64 %arg, i32 %idx246 ret <2 x i64> %x247}248 249define <4 x i32> @insert_i32_x(<4 x i32> %dest, i32 %arg, i32 %idx) {250; CHECK-P7-LABEL: 'insert_i32_x'251; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <4 x i32> %dest, i32 %arg, i32 %idx252; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x253;254; CHECK-P8LE-LABEL: 'insert_i32_x'255; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <4 x i32> %dest, i32 %arg, i32 %idx256; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x257;258; CHECK-P9BE-LABEL: 'insert_i32_x'259; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %x = insertelement <4 x i32> %dest, i32 %arg, i32 %idx260; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x261;262; CHECK-P9LE-LABEL: 'insert_i32_x'263; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %x = insertelement <4 x i32> %dest, i32 %arg, i32 %idx264; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x265;266; CHECK-P10-LABEL: 'insert_i32_x'267; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = insertelement <4 x i32> %dest, i32 %arg, i32 %idx268; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x269;270 %x = insertelement <4 x i32> %dest, i32 %arg, i32 %idx271 ret <4 x i32> %x272}273 274define <8 x i16> @insert_i16_x(<8 x i16> %dest, i16 %arg, i32 %idx) {275; CHECK-P7-LABEL: 'insert_i16_x'276; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <8 x i16> %dest, i16 %arg, i32 %idx277; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %x278;279; CHECK-P8LE-LABEL: 'insert_i16_x'280; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <8 x i16> %dest, i16 %arg, i32 %idx281; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %x282;283; CHECK-P9BE-LABEL: 'insert_i16_x'284; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %x = insertelement <8 x i16> %dest, i16 %arg, i32 %idx285; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %x286;287; CHECK-P9LE-LABEL: 'insert_i16_x'288; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %x = insertelement <8 x i16> %dest, i16 %arg, i32 %idx289; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %x290;291; CHECK-P10-LABEL: 'insert_i16_x'292; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = insertelement <8 x i16> %dest, i16 %arg, i32 %idx293; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %x294;295 %x = insertelement <8 x i16> %dest, i16 %arg, i32 %idx296 ret <8 x i16> %x297}298 299define <16 x i8> @insert_i8_x(<16 x i8> %dest, i8 %arg, i32 %idx) {300; CHECK-P7-LABEL: 'insert_i8_x'301; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <16 x i8> %dest, i8 %arg, i32 %idx302; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %x303;304; CHECK-P8LE-LABEL: 'insert_i8_x'305; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <16 x i8> %dest, i8 %arg, i32 %idx306; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %x307;308; CHECK-P9BE-LABEL: 'insert_i8_x'309; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %x = insertelement <16 x i8> %dest, i8 %arg, i32 %idx310; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %x311;312; CHECK-P9LE-LABEL: 'insert_i8_x'313; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %x = insertelement <16 x i8> %dest, i8 %arg, i32 %idx314; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %x315;316; CHECK-P10-LABEL: 'insert_i8_x'317; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = insertelement <16 x i8> %dest, i8 %arg, i32 %idx318; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %x319;320 %x = insertelement <16 x i8> %dest, i8 %arg, i32 %idx321 ret <16 x i8> %x322}323 324define i64 @extract_i64_x(<2 x i64> %arg, i32 %idx) {325; CHECK-P7-LABEL: 'extract_i64_x'326; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <2 x i64> %arg, i32 %idx327; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %x328;329; CHECK-P8LE-LABEL: 'extract_i64_x'330; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <2 x i64> %arg, i32 %idx331; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %x332;333; CHECK-P9BE-LABEL: 'extract_i64_x'334; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <2 x i64> %arg, i32 %idx335; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %x336;337; CHECK-P9LE-LABEL: 'extract_i64_x'338; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <2 x i64> %arg, i32 %idx339; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %x340;341; CHECK-P10-LABEL: 'extract_i64_x'342; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = extractelement <2 x i64> %arg, i32 %idx343; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %x344;345 %x = extractelement <2 x i64> %arg, i32 %idx346 ret i64 %x347}348 349define i32 @extract_i32_x(<4 x i32> %arg, i32 %idx) {350; CHECK-P7-LABEL: 'extract_i32_x'351; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <4 x i32> %arg, i32 %idx352; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x353;354; CHECK-P8LE-LABEL: 'extract_i32_x'355; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <4 x i32> %arg, i32 %idx356; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x357;358; CHECK-P9BE-LABEL: 'extract_i32_x'359; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <4 x i32> %arg, i32 %idx360; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x361;362; CHECK-P9LE-LABEL: 'extract_i32_x'363; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <4 x i32> %arg, i32 %idx364; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x365;366; CHECK-P10-LABEL: 'extract_i32_x'367; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = extractelement <4 x i32> %arg, i32 %idx368; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x369;370 %x = extractelement <4 x i32> %arg, i32 %idx371 ret i32 %x372}373 374define i16 @extract_i16_x(<8 x i16> %arg, i32 %idx) {375; CHECK-P7-LABEL: 'extract_i16_x'376; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <8 x i16> %arg, i32 %idx377; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %x378;379; CHECK-P8LE-LABEL: 'extract_i16_x'380; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <8 x i16> %arg, i32 %idx381; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %x382;383; CHECK-P9BE-LABEL: 'extract_i16_x'384; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <8 x i16> %arg, i32 %idx385; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %x386;387; CHECK-P9LE-LABEL: 'extract_i16_x'388; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <8 x i16> %arg, i32 %idx389; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %x390;391; CHECK-P10-LABEL: 'extract_i16_x'392; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = extractelement <8 x i16> %arg, i32 %idx393; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %x394;395 %x = extractelement <8 x i16> %arg, i32 %idx396 ret i16 %x397}398 399define i8 @extract_i8_x(<16 x i8> %arg, i32 %idx) {400; CHECK-P7-LABEL: 'extract_i8_x'401; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <16 x i8> %arg, i32 %idx402; CHECK-P7-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %x403;404; CHECK-P8LE-LABEL: 'extract_i8_x'405; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <16 x i8> %arg, i32 %idx406; CHECK-P8LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %x407;408; CHECK-P9BE-LABEL: 'extract_i8_x'409; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <16 x i8> %arg, i32 %idx410; CHECK-P9BE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %x411;412; CHECK-P9LE-LABEL: 'extract_i8_x'413; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <16 x i8> %arg, i32 %idx414; CHECK-P9LE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %x415;416; CHECK-P10-LABEL: 'extract_i8_x'417; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %x = extractelement <16 x i8> %arg, i32 %idx418; CHECK-P10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %x419;420 %x = extractelement <16 x i8> %arg, i32 %idx421 ret i8 %x422}423