brintos

brintos / llvm-project-archived public Read only

0
0
Text · 29.1 KiB · ec515fc Raw
554 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+sse2 | FileCheck %s --check-prefixes=CHECK,SSE23; RUN: opt < %s -mtriple=x86_64-apple-darwin -passes="print<cost-model>" 2>&1 -disable-output -mattr=+sse4.1 | FileCheck %s --check-prefixes=CHECK,SSE414 5define void @zext_v4i8_to_v4i64(ptr %a) {6; SSE2-LABEL: 'zext_v4i8_to_v4i64'7; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, ptr %a, align 48; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %2 = zext <4 x i8> %1 to <4 x i64>9; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, ptr undef, align 410; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void11;12; SSE41-LABEL: 'zext_v4i8_to_v4i64'13; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, ptr %a, align 414; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <4 x i8> %1 to <4 x i64>15; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, ptr undef, align 416; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void17;18  %1 = load <4 x i8>, ptr %a19  %2 = zext <4 x i8> %1 to <4 x i64>20  store <4 x i64> %2, ptr undef, align 421  ret void22}23 24define void @sext_v4i8_to_v4i64(ptr %a) {25; SSE2-LABEL: 'sext_v4i8_to_v4i64'26; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, ptr %a, align 427; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %2 = sext <4 x i8> %1 to <4 x i64>28; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, ptr undef, align 429; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void30;31; SSE41-LABEL: 'sext_v4i8_to_v4i64'32; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, ptr %a, align 433; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <4 x i8> %1 to <4 x i64>34; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, ptr undef, align 435; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void36;37  %1 = load <4 x i8>, ptr %a38  %2 = sext <4 x i8> %1 to <4 x i64>39  store <4 x i64> %2, ptr undef, align 440  ret void41}42 43define void @zext_v4i16_to_v4i64(ptr %a) {44; SSE2-LABEL: 'zext_v4i16_to_v4i64'45; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, ptr %a, align 846; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %2 = zext <4 x i16> %1 to <4 x i64>47; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, ptr undef, align 448; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void49;50; SSE41-LABEL: 'zext_v4i16_to_v4i64'51; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, ptr %a, align 852; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <4 x i16> %1 to <4 x i64>53; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, ptr undef, align 454; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void55;56  %1 = load <4 x i16>, ptr %a57  %2 = zext <4 x i16> %1 to <4 x i64>58  store <4 x i64> %2, ptr undef, align 459  ret void60}61 62define void @sext_v4i16_to_v4i64(ptr %a) {63; SSE2-LABEL: 'sext_v4i16_to_v4i64'64; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, ptr %a, align 865; SSE2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %2 = sext <4 x i16> %1 to <4 x i64>66; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, ptr undef, align 467; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void68;69; SSE41-LABEL: 'sext_v4i16_to_v4i64'70; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, ptr %a, align 871; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <4 x i16> %1 to <4 x i64>72; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, ptr undef, align 473; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void74;75  %1 = load <4 x i16>, ptr %a76  %2 = sext <4 x i16> %1 to <4 x i64>77  store <4 x i64> %2, ptr undef, align 478  ret void79}80 81 82define void @zext_v4i32_to_v4i64(ptr %a) {83; CHECK-LABEL: 'zext_v4i32_to_v4i64'84; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, ptr %a, align 1685; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <4 x i32> %1 to <4 x i64>86; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, ptr undef, align 487; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void88;89  %1 = load <4 x i32>, ptr %a90  %2 = zext <4 x i32> %1 to <4 x i64>91  store <4 x i64> %2, ptr undef, align 492  ret void93}94 95define void @sext_v4i32_to_v4i64(ptr %a) {96; SSE2-LABEL: 'sext_v4i32_to_v4i64'97; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, ptr %a, align 1698; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %2 = sext <4 x i32> %1 to <4 x i64>99; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, ptr undef, align 4100; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void101;102; SSE41-LABEL: 'sext_v4i32_to_v4i64'103; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, ptr %a, align 16104; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <4 x i32> %1 to <4 x i64>105; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> %2, ptr undef, align 4106; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void107;108  %1 = load <4 x i32>, ptr %a109  %2 = sext <4 x i32> %1 to <4 x i64>110  store <4 x i64> %2, ptr undef, align 4111  ret void112}113 114define void @zext_v16i16_to_v16i32(ptr %a) {115; CHECK-LABEL: 'zext_v16i16_to_v16i32'116; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %1 = load <16 x i16>, ptr %a, align 32117; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %2 = zext <16 x i16> %1 to <16 x i32>118; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, ptr undef, align 4119; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void120;121  %1 = load <16 x i16>, ptr %a122  %2 = zext <16 x i16> %1 to <16 x i32>123  store <16 x i32> %2, ptr undef, align 4124  ret void125}126 127define void @sext_v16i16_to_v16i32(ptr %a) {128; SSE2-LABEL: 'sext_v16i16_to_v16i32'129; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %1 = load <16 x i16>, ptr %a, align 32130; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %2 = sext <16 x i16> %1 to <16 x i32>131; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, ptr undef, align 4132; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void133;134; SSE41-LABEL: 'sext_v16i16_to_v16i32'135; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %1 = load <16 x i16>, ptr %a, align 32136; SSE41-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %2 = sext <16 x i16> %1 to <16 x i32>137; SSE41-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, ptr undef, align 4138; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void139;140  %1 = load <16 x i16>, ptr %a141  %2 = sext <16 x i16> %1 to <16 x i32>142  store <16 x i32> %2, ptr undef, align 4143  ret void144}145 146define void @zext_v8i16_to_v8i32(ptr %a) {147; CHECK-LABEL: 'zext_v8i16_to_v8i32'148; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i16>, ptr %a, align 16149; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <8 x i16> %1 to <8 x i32>150; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, ptr undef, align 4151; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void152;153  %1 = load <8 x i16>, ptr %a154  %2 = zext <8 x i16> %1 to <8 x i32>155  store <8 x i32> %2, ptr undef, align 4156  ret void157}158 159define void @sext_v8i16_to_v8i32(ptr %a) {160; SSE2-LABEL: 'sext_v8i16_to_v8i32'161; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i16>, ptr %a, align 16162; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %2 = sext <8 x i16> %1 to <8 x i32>163; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, ptr undef, align 4164; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void165;166; SSE41-LABEL: 'sext_v8i16_to_v8i32'167; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i16>, ptr %a, align 16168; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <8 x i16> %1 to <8 x i32>169; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, ptr undef, align 4170; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void171;172  %1 = load <8 x i16>, ptr %a173  %2 = sext <8 x i16> %1 to <8 x i32>174  store <8 x i32> %2, ptr undef, align 4175  ret void176}177 178define void @zext_v4i16_to_v4i32(ptr %a) {179; CHECK-LABEL: 'zext_v4i16_to_v4i32'180; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, ptr %a, align 8181; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %2 = zext <4 x i16> %1 to <4 x i32>182; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, ptr undef, align 4183; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void184;185  %1 = load <4 x i16>, ptr %a186  %2 = zext <4 x i16> %1 to <4 x i32>187  store <4 x i32> %2, ptr undef, align 4188  ret void189}190 191define void @sext_v4i16_to_v4i32(ptr %a) {192; SSE2-LABEL: 'sext_v4i16_to_v4i32'193; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, ptr %a, align 8194; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <4 x i16> %1 to <4 x i32>195; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, ptr undef, align 4196; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void197;198; SSE41-LABEL: 'sext_v4i16_to_v4i32'199; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, ptr %a, align 8200; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %2 = sext <4 x i16> %1 to <4 x i32>201; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, ptr undef, align 4202; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void203;204  %1 = load <4 x i16>, ptr %a205  %2 = sext <4 x i16> %1 to <4 x i32>206  store <4 x i32> %2, ptr undef, align 4207  ret void208}209 210define void @zext_v16i8_to_v16i32(ptr %a) {211; SSE2-LABEL: 'zext_v16i8_to_v16i32'212; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, ptr %a, align 16213; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %2 = zext <16 x i8> %1 to <16 x i32>214; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, ptr undef, align 4215; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void216;217; SSE41-LABEL: 'zext_v16i8_to_v16i32'218; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, ptr %a, align 16219; SSE41-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %2 = zext <16 x i8> %1 to <16 x i32>220; SSE41-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, ptr undef, align 4221; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void222;223  %1 = load <16 x i8>, ptr %a224  %2 = zext <16 x i8> %1 to <16 x i32>225  store <16 x i32> %2, ptr undef, align 4226  ret void227}228 229define void @sext_v16i8_to_v16i32(ptr %a) {230; SSE2-LABEL: 'sext_v16i8_to_v16i32'231; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, ptr %a, align 16232; SSE2-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %2 = sext <16 x i8> %1 to <16 x i32>233; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, ptr undef, align 4234; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void235;236; SSE41-LABEL: 'sext_v16i8_to_v16i32'237; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, ptr %a, align 16238; SSE41-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %2 = sext <16 x i8> %1 to <16 x i32>239; SSE41-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> %2, ptr undef, align 4240; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void241;242  %1 = load <16 x i8>, ptr %a243  %2 = sext <16 x i8> %1 to <16 x i32>244  store <16 x i32> %2, ptr undef, align 4245  ret void246}247 248define void @zext_v8i8_to_v8i32(ptr %a) {249; SSE2-LABEL: 'zext_v8i8_to_v8i32'250; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, ptr %a, align 8251; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %2 = zext <8 x i8> %1 to <8 x i32>252; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, ptr undef, align 4253; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void254;255; SSE41-LABEL: 'zext_v8i8_to_v8i32'256; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, ptr %a, align 8257; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <8 x i8> %1 to <8 x i32>258; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, ptr undef, align 4259; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void260;261  %1 = load <8 x i8>, ptr %a262  %2 = zext <8 x i8> %1 to <8 x i32>263  store <8 x i32> %2, ptr undef, align 4264  ret void265}266 267define void @sext_v8i8_to_v8i32(ptr %a) {268; SSE2-LABEL: 'sext_v8i8_to_v8i32'269; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, ptr %a, align 8270; SSE2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %2 = sext <8 x i8> %1 to <8 x i32>271; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, ptr undef, align 4272; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void273;274; SSE41-LABEL: 'sext_v8i8_to_v8i32'275; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, ptr %a, align 8276; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <8 x i8> %1 to <8 x i32>277; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> %2, ptr undef, align 4278; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void279;280  %1 = load <8 x i8>, ptr %a281  %2 = sext <8 x i8> %1 to <8 x i32>282  store <8 x i32> %2, ptr undef, align 4283  ret void284}285 286define void @zext_v4i8_to_v4i32(ptr %a) {287; SSE2-LABEL: 'zext_v4i8_to_v4i32'288; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, ptr %a, align 4289; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <4 x i8> %1 to <4 x i32>290; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, ptr undef, align 4291; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void292;293; SSE41-LABEL: 'zext_v4i8_to_v4i32'294; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, ptr %a, align 4295; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %2 = zext <4 x i8> %1 to <4 x i32>296; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, ptr undef, align 4297; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void298;299  %1 = load <4 x i8>, ptr %a300  %2 = zext <4 x i8> %1 to <4 x i32>301  store <4 x i32> %2, ptr undef, align 4302  ret void303}304 305define void @sext_v4i8_to_v4i32(ptr %a) {306; SSE2-LABEL: 'sext_v4i8_to_v4i32'307; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, ptr %a, align 4308; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %2 = sext <4 x i8> %1 to <4 x i32>309; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, ptr undef, align 4310; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void311;312; SSE41-LABEL: 'sext_v4i8_to_v4i32'313; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, ptr %a, align 4314; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %2 = sext <4 x i8> %1 to <4 x i32>315; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> %2, ptr undef, align 4316; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void317;318  %1 = load <4 x i8>, ptr %a319  %2 = sext <4 x i8> %1 to <4 x i32>320  store <4 x i32> %2, ptr undef, align 4321  ret void322}323 324define void @zext_v16i8_to_v16i16(ptr %a) {325; CHECK-LABEL: 'zext_v16i8_to_v16i16'326; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, ptr %a, align 16327; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = zext <16 x i8> %1 to <16 x i16>328; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> %2, ptr undef, align 4329; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void330;331  %1 = load <16 x i8>, ptr %a332  %2 = zext <16 x i8> %1 to <16 x i16>333  store <16 x i16> %2, ptr undef, align 4334  ret void335}336 337define void @sext_v16i8_to_v16i16(ptr %a) {338; SSE2-LABEL: 'sext_v16i8_to_v16i16'339; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, ptr %a, align 16340; SSE2-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %2 = sext <16 x i8> %1 to <16 x i16>341; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> %2, ptr undef, align 4342; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void343;344; SSE41-LABEL: 'sext_v16i8_to_v16i16'345; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <16 x i8>, ptr %a, align 16346; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <16 x i8> %1 to <16 x i16>347; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> %2, ptr undef, align 4348; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void349;350  %1 = load <16 x i8>, ptr %a351  %2 = sext <16 x i8> %1 to <16 x i16>352  store <16 x i16> %2, ptr undef, align 4353  ret void354}355 356define void @zext_v8i8_to_v8i16(ptr %a) {357; CHECK-LABEL: 'zext_v8i8_to_v8i16'358; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, ptr %a, align 8359; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %2 = zext <8 x i8> %1 to <8 x i16>360; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> %2, ptr undef, align 4361; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void362;363  %1 = load <8 x i8>, ptr %a364  %2 = zext <8 x i8> %1 to <8 x i16>365  store <8 x i16> %2, ptr undef, align 4366  ret void367}368 369define void @sext_v8i8_to_v8i16(ptr %a) {370; SSE2-LABEL: 'sext_v8i8_to_v8i16'371; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, ptr %a, align 8372; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <8 x i8> %1 to <8 x i16>373; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> %2, ptr undef, align 4374; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void375;376; SSE41-LABEL: 'sext_v8i8_to_v8i16'377; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i8>, ptr %a, align 8378; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %2 = sext <8 x i8> %1 to <8 x i16>379; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> %2, ptr undef, align 4380; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void381;382  %1 = load <8 x i8>, ptr %a383  %2 = sext <8 x i8> %1 to <8 x i16>384  store <8 x i16> %2, ptr undef, align 4385  ret void386}387 388define void @zext_v4i8_to_v4i16(ptr %a) {389; CHECK-LABEL: 'zext_v4i8_to_v4i16'390; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, ptr %a, align 4391; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %2 = zext <4 x i8> %1 to <4 x i16>392; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> %2, ptr undef, align 4393; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void394;395  %1 = load <4 x i8>, ptr %a396  %2 = zext <4 x i8> %1 to <4 x i16>397  store <4 x i16> %2, ptr undef, align 4398  ret void399}400 401define void @sext_v4i8_to_v4i16(ptr %a) {402; SSE2-LABEL: 'sext_v4i8_to_v4i16'403; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, ptr %a, align 4404; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = sext <4 x i8> %1 to <4 x i16>405; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> %2, ptr undef, align 4406; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void407;408; SSE41-LABEL: 'sext_v4i8_to_v4i16'409; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i8>, ptr %a, align 4410; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %2 = sext <4 x i8> %1 to <4 x i16>411; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> %2, ptr undef, align 4412; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void413;414  %1 = load <4 x i8>, ptr %a415  %2 = sext <4 x i8> %1 to <4 x i16>416  store <4 x i16> %2, ptr undef, align 4417  ret void418}419 420define void @truncate_v16i32_to_v16i16(ptr %a) {421; CHECK-LABEL: 'truncate_v16i32_to_v16i16'422; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %1 = load <16 x i32>, ptr %a, align 64423; CHECK-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %2 = trunc <16 x i32> %1 to <16 x i16>424; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> %2, ptr undef, align 4425; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void426;427  %1 = load <16 x i32>, ptr %a428  %2 = trunc <16 x i32> %1 to <16 x i16>429  store <16 x i16> %2, ptr undef, align 4430  ret void431}432 433define void @truncate_v8i32_to_v8i16(ptr %a) {434; CHECK-LABEL: 'truncate_v8i32_to_v8i16'435; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %1 = load <8 x i32>, ptr %a, align 32436; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %2 = trunc <8 x i32> %1 to <8 x i16>437; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> %2, ptr undef, align 4438; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void439;440  %1 = load <8 x i32>, ptr %a441  %2 = trunc <8 x i32> %1 to <8 x i16>442  store <8 x i16> %2, ptr undef, align 4443  ret void444}445 446define void @truncate_v4i32_to_v4i16(ptr %a) {447; SSE2-LABEL: 'truncate_v4i32_to_v4i16'448; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, ptr %a, align 16449; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %2 = trunc <4 x i32> %1 to <4 x i16>450; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> %2, ptr undef, align 4451; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void452;453; SSE41-LABEL: 'truncate_v4i32_to_v4i16'454; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, ptr %a, align 16455; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = trunc <4 x i32> %1 to <4 x i16>456; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> %2, ptr undef, align 4457; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void458;459  %1 = load <4 x i32>, ptr %a460  %2 = trunc <4 x i32> %1 to <4 x i16>461  store <4 x i16> %2, ptr undef, align 4462  ret void463}464 465define void @truncate_v16i32_to_v16i8(ptr %a) {466; CHECK-LABEL: 'truncate_v16i32_to_v16i8'467; CHECK-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %1 = load <16 x i32>, ptr %a, align 64468; CHECK-NEXT:  Cost Model: Found an estimated cost of 7 for instruction: %2 = trunc <16 x i32> %1 to <16 x i8>469; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> %2, ptr undef, align 4470; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void471;472  %1 = load <16 x i32>, ptr %a473  %2 = trunc <16 x i32> %1 to <16 x i8>474  store <16 x i8> %2, ptr undef, align 4475  ret void476}477 478define void @truncate_v8i32_to_v8i8(ptr %a) {479; SSE2-LABEL: 'truncate_v8i32_to_v8i8'480; SSE2-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %1 = load <8 x i32>, ptr %a, align 32481; SSE2-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %2 = trunc <8 x i32> %1 to <8 x i8>482; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <8 x i8> %2, ptr undef, align 4483; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void484;485; SSE41-LABEL: 'truncate_v8i32_to_v8i8'486; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %1 = load <8 x i32>, ptr %a, align 32487; SSE41-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %2 = trunc <8 x i32> %1 to <8 x i8>488; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <8 x i8> %2, ptr undef, align 4489; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void490;491  %1 = load <8 x i32>, ptr %a492  %2 = trunc <8 x i32> %1 to <8 x i8>493  store <8 x i8> %2, ptr undef, align 4494  ret void495}496 497define void @truncate_v4i32_to_v4i8(ptr %a) {498; SSE2-LABEL: 'truncate_v4i32_to_v4i8'499; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, ptr %a, align 16500; SSE2-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %2 = trunc <4 x i32> %1 to <4 x i8>501; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> %2, ptr undef, align 4502; SSE2-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void503;504; SSE41-LABEL: 'truncate_v4i32_to_v4i8'505; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, ptr %a, align 16506; SSE41-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = trunc <4 x i32> %1 to <4 x i8>507; SSE41-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> %2, ptr undef, align 4508; SSE41-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void509;510  %1 = load <4 x i32>, ptr %a511  %2 = trunc <4 x i32> %1 to <4 x i8>512  store <4 x i8> %2, ptr undef, align 4513  ret void514}515 516define void @truncate_v16i16_to_v16i8(ptr %a) {517; CHECK-LABEL: 'truncate_v16i16_to_v16i8'518; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %1 = load <16 x i16>, ptr %a, align 32519; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %2 = trunc <16 x i16> %1 to <16 x i8>520; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> %2, ptr undef, align 4521; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void522;523  %1 = load <16 x i16>, ptr %a524  %2 = trunc <16 x i16> %1 to <16 x i8>525  store <16 x i8> %2, ptr undef, align 4526  ret void527}528 529define void @truncate_v8i16_to_v8i8(ptr %a) {530; CHECK-LABEL: 'truncate_v8i16_to_v8i8'531; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <8 x i16>, ptr %a, align 16532; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = trunc <8 x i16> %1 to <8 x i8>533; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <8 x i8> %2, ptr undef, align 4534; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void535;536  %1 = load <8 x i16>, ptr %a537  %2 = trunc <8 x i16> %1 to <8 x i8>538  store <8 x i8> %2, ptr undef, align 4539  ret void540}541 542define void @truncate_v4i16_to_v4i8(ptr %a) {543; CHECK-LABEL: 'truncate_v4i16_to_v4i8'544; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i16>, ptr %a, align 8545; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %2 = trunc <4 x i16> %1 to <4 x i8>546; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> %2, ptr undef, align 4547; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void548;549  %1 = load <4 x i16>, ptr %a550  %2 = trunc <4 x i16> %1 to <4 x i8>551  store <4 x i8> %2, ptr undef, align 4552  ret void553}554