brintos

brintos / llvm-project-archived public Read only

0
0
Text · 19.6 KiB · ebc8d83 Raw
565 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 52; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=systemz-unknown -mcpu=z13 \3; RUN:  | FileCheck %s -check-prefix=COST4 5; Check that all divide/remainder instructions are implemented by cheaper instructions.6; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -o - | FileCheck %s7; CHECK-NOT: dsg8; CHECK-NOT: dl9 10; Scalar sdiv11 12define i64 @fun0(i64 %a) {13; COST-LABEL: 'fun0'14; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i64 %a, 215; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %r16;17  %r = sdiv i64 %a, 218  ret i64 %r19}20 21define i64 @fun1(i64 %a) {22; COST-LABEL: 'fun1'23; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i64 %a, -424; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %r25;26  %r = sdiv i64 %a, -427  ret i64 %r28}29 30define i32 @fun2(i32 %a) {31; COST-LABEL: 'fun2'32; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i32 %a, 833; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r34;35  %r = sdiv i32 %a, 836  ret i32 %r37}38 39define i32 @fun3(i32 %a) {40; COST-LABEL: 'fun3'41; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i32 %a, -1642; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r43;44  %r = sdiv i32 %a, -1645  ret i32 %r46}47 48define i16 @fun4(i16 %a) {49; COST-LABEL: 'fun4'50; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i16 %a, 3251; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %r52;53  %r = sdiv i16 %a, 3254  ret i16 %r55}56 57define i16 @fun5(i16 %a) {58; COST-LABEL: 'fun5'59; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i16 %a, -6460; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %r61;62  %r = sdiv i16 %a, -6463  ret i16 %r64}65 66define i8 @fun6(i8 %a) {67; COST-LABEL: 'fun6'68; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i8 %a, 6469; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %r70;71  %r = sdiv i8 %a, 6472  ret i8 %r73}74 75define i8 @fun7(i8 %a) {76; COST-LABEL: 'fun7'77; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i8 %a, -12878; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %r79;80  %r = sdiv i8 %a, -12881  ret i8 %r82}83 84; Vector sdiv85 86define <2 x i64> @fun8(<2 x i64> %a) {87; COST-LABEL: 'fun8'88; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <2 x i64> %a, splat (i64 2)89; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %r90;91  %r = sdiv <2 x i64> %a, <i64 2, i64 2>92  ret <2 x i64> %r93}94 95define <2 x i64> @fun9(<2 x i64> %a) {96; COST-LABEL: 'fun9'97; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <2 x i64> %a, splat (i64 -4)98; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %r99;100  %r = sdiv <2 x i64> %a, <i64 -4, i64 -4>101  ret <2 x i64> %r102}103 104define <4 x i32> @fun10(<4 x i32> %a) {105; COST-LABEL: 'fun10'106; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <4 x i32> %a, splat (i32 8)107; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %r108;109  %r = sdiv <4 x i32> %a, <i32 8, i32 8, i32 8, i32 8>110  ret <4 x i32> %r111}112 113define <4 x i32> @fun11(<4 x i32> %a) {114; COST-LABEL: 'fun11'115; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <4 x i32> %a, splat (i32 -16)116; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %r117;118  %r = sdiv <4 x i32> %a, <i32 -16, i32 -16, i32 -16, i32 -16>119  ret <4 x i32> %r120}121 122define <2 x i32> @fun12(<2 x i32> %a) {123; COST-LABEL: 'fun12'124; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <2 x i32> %a, splat (i32 -16)125; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i32> %r126;127  %r = sdiv <2 x i32> %a, <i32 -16, i32 -16>128  ret <2 x i32> %r129}130 131define <8 x i16> @fun13(<8 x i16> %a) {132; COST-LABEL: 'fun13'133; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <8 x i16> %a, splat (i16 32)134; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %r135;136  %r = sdiv <8 x i16> %a, <i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32>137  ret <8 x i16> %r138}139 140define <8 x i16> @fun14(<8 x i16> %a) {141; COST-LABEL: 'fun14'142; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <8 x i16> %a, splat (i16 -64)143; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %r144;145  %r = sdiv <8 x i16> %a, <i16 -64, i16 -64, i16 -64, i16 -64, i16 -64, i16 -64, i16 -64, i16 -64>146  ret <8 x i16> %r147}148 149define <4 x i16> @fun15(<4 x i16> %a) {150; COST-LABEL: 'fun15'151; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <4 x i16> %a, splat (i16 32)152; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i16> %r153;154  %r = sdiv <4 x i16> %a, <i16 32, i16 32, i16 32, i16 32>155  ret <4 x i16> %r156}157 158define <16 x i8> @fun16(<16 x i8> %a) {159; COST-LABEL: 'fun16'160; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <16 x i8> %a, splat (i8 64)161; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %r162;163  %r = sdiv <16 x i8> %a, <i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64>164  ret <16 x i8> %r165}166 167define <16 x i8> @fun17(<16 x i8> %a) {168; COST-LABEL: 'fun17'169; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <16 x i8> %a, splat (i8 -128)170; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %r171;172  %r = sdiv <16 x i8> %a, <i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>173  ret <16 x i8> %r174}175 176define <8 x i8> @fun18(<8 x i8> %a) {177; COST-LABEL: 'fun18'178; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <8 x i8> %a, splat (i8 -128)179; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %r180;181  %r = sdiv <8 x i8> %a, <i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>182  ret <8 x i8> %r183}184 185; Scalar udiv186 187define i64 @fun19(i64 %a) {188; COST-LABEL: 'fun19'189; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = udiv i64 %a, 2190; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %r191;192  %r = udiv i64 %a, 2193  ret i64 %r194}195 196define i32 @fun20(i32 %a) {197; COST-LABEL: 'fun20'198; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = udiv i32 %a, 8199; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r200;201  %r = udiv i32 %a, 8202  ret i32 %r203}204 205define i16 @fun21(i16 %a) {206; COST-LABEL: 'fun21'207; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = udiv i16 %a, 32208; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %r209;210  %r = udiv i16 %a, 32211  ret i16 %r212}213 214define i8 @fun22(i8 %a) {215; COST-LABEL: 'fun22'216; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = udiv i8 %a, -128217; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %r218;219  %r = udiv i8 %a, 128220  ret i8 %r221}222 223; Vector udiv224 225define <2 x i64> @fun23(<2 x i64> %a) {226; COST-LABEL: 'fun23'227; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = udiv <2 x i64> %a, splat (i64 2)228; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %r229;230  %r = udiv <2 x i64> %a, <i64 2, i64 2>231  ret <2 x i64> %r232}233 234define <4 x i32> @fun24(<4 x i32> %a) {235; COST-LABEL: 'fun24'236; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = udiv <4 x i32> %a, splat (i32 8)237; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %r238;239  %r = udiv <4 x i32> %a, <i32 8, i32 8, i32 8, i32 8>240  ret <4 x i32> %r241}242 243define <2 x i32> @fun25(<2 x i32> %a) {244; COST-LABEL: 'fun25'245; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = udiv <2 x i32> %a, splat (i32 8)246; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i32> %r247;248  %r = udiv <2 x i32> %a, <i32 8, i32 8>249  ret <2 x i32> %r250}251 252define <8 x i16> @fun26(<8 x i16> %a) {253; COST-LABEL: 'fun26'254; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = udiv <8 x i16> %a, splat (i16 32)255; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %r256;257  %r = udiv <8 x i16> %a, <i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32>258  ret <8 x i16> %r259}260 261define <4 x i16> @fun27(<4 x i16> %a) {262; COST-LABEL: 'fun27'263; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = udiv <4 x i16> %a, splat (i16 32)264; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i16> %r265;266  %r = udiv <4 x i16> %a, <i16 32, i16 32, i16 32, i16 32>267  ret <4 x i16> %r268}269 270define <16 x i8> @fun28(<16 x i8> %a) {271; COST-LABEL: 'fun28'272; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = udiv <16 x i8> %a, splat (i8 -128)273; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %r274;275  %r = udiv <16 x i8> %a, <i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128>276  ret <16 x i8> %r277}278 279define <8 x i8> @fun29(<8 x i8> %a) {280; COST-LABEL: 'fun29'281; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = udiv <8 x i8> %a, splat (i8 -128)282; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %r283;284  %r = udiv <8 x i8> %a, <i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128>285  ret <8 x i8> %r286}287 288; Scalar srem289 290define i64 @fun30(i64 %a) {291; COST-LABEL: 'fun30'292; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem i64 %a, 2293; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %r294;295  %r = srem i64 %a, 2296  ret i64 %r297}298 299define i64 @fun31(i64 %a) {300; COST-LABEL: 'fun31'301; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem i64 %a, -4302; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %r303;304  %r = srem i64 %a, -4305  ret i64 %r306}307 308define i32 @fun32(i32 %a) {309; COST-LABEL: 'fun32'310; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem i32 %a, 8311; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r312;313  %r = srem i32 %a, 8314  ret i32 %r315}316 317define i32 @fun33(i32 %a) {318; COST-LABEL: 'fun33'319; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem i32 %a, -16320; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r321;322  %r = srem i32 %a, -16323  ret i32 %r324}325 326define i16 @fun34(i16 %a) {327; COST-LABEL: 'fun34'328; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem i16 %a, 32329; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %r330;331  %r = srem i16 %a, 32332  ret i16 %r333}334 335define i16 @fun35(i16 %a) {336; COST-LABEL: 'fun35'337; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem i16 %a, -64338; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %r339;340  %r = srem i16 %a, -64341  ret i16 %r342}343 344define i8 @fun36(i8 %a) {345; COST-LABEL: 'fun36'346; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem i8 %a, 64347; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %r348;349  %r = srem i8 %a, 64350  ret i8 %r351}352 353define i8 @fun37(i8 %a) {354; COST-LABEL: 'fun37'355; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem i8 %a, -128356; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %r357;358  %r = srem i8 %a, -128359  ret i8 %r360}361 362; Vector srem363 364define <2 x i64> @fun38(<2 x i64> %a) {365; COST-LABEL: 'fun38'366; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem <2 x i64> %a, splat (i64 2)367; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %r368;369  %r = srem <2 x i64> %a, <i64 2, i64 2>370  ret <2 x i64> %r371}372 373define <2 x i64> @fun39(<2 x i64> %a) {374; COST-LABEL: 'fun39'375; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem <2 x i64> %a, splat (i64 -4)376; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %r377;378  %r = srem <2 x i64> %a, <i64 -4, i64 -4>379  ret <2 x i64> %r380}381 382define <4 x i32> @fun40(<4 x i32> %a) {383; COST-LABEL: 'fun40'384; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem <4 x i32> %a, splat (i32 8)385; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %r386;387  %r = srem <4 x i32> %a, <i32 8, i32 8, i32 8, i32 8>388  ret <4 x i32> %r389}390 391define <4 x i32> @fun41(<4 x i32> %a) {392; COST-LABEL: 'fun41'393; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem <4 x i32> %a, splat (i32 -16)394; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %r395;396  %r = srem <4 x i32> %a, <i32 -16, i32 -16, i32 -16, i32 -16>397  ret <4 x i32> %r398}399 400define <2 x i32> @fun42(<2 x i32> %a) {401; COST-LABEL: 'fun42'402; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem <2 x i32> %a, splat (i32 -16)403; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i32> %r404;405  %r = srem <2 x i32> %a, <i32 -16, i32 -16>406  ret <2 x i32> %r407}408 409define <8 x i16> @fun43(<8 x i16> %a) {410; COST-LABEL: 'fun43'411; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem <8 x i16> %a, splat (i16 32)412; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %r413;414  %r = srem <8 x i16> %a, <i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32>415  ret <8 x i16> %r416}417 418define <8 x i16> @fun44(<8 x i16> %a) {419; COST-LABEL: 'fun44'420; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem <8 x i16> %a, splat (i16 -64)421; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %r422;423  %r = srem <8 x i16> %a, <i16 -64, i16 -64, i16 -64, i16 -64, i16 -64, i16 -64, i16 -64, i16 -64>424  ret <8 x i16> %r425}426 427define <4 x i16> @fun45(<4 x i16> %a) {428; COST-LABEL: 'fun45'429; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem <4 x i16> %a, splat (i16 32)430; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i16> %r431;432  %r = srem <4 x i16> %a, <i16 32, i16 32, i16 32, i16 32>433  ret <4 x i16> %r434}435 436define <16 x i8> @fun46(<16 x i8> %a) {437; COST-LABEL: 'fun46'438; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem <16 x i8> %a, splat (i8 64)439; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %r440;441  %r = srem <16 x i8> %a, <i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64>442  ret <16 x i8> %r443}444 445define <16 x i8> @fun47(<16 x i8> %a) {446; COST-LABEL: 'fun47'447; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem <16 x i8> %a, splat (i8 -128)448; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %r449;450  %r = srem <16 x i8> %a, <i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>451  ret <16 x i8> %r452}453 454define <8 x i8> @fun48(<8 x i8> %a) {455; COST-LABEL: 'fun48'456; COST-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %r = srem <8 x i8> %a, splat (i8 -128)457; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %r458;459  %r = srem <8 x i8> %a, <i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>460  ret <8 x i8> %r461}462 463; Scalar urem464 465define i64 @fun49(i64 %a) {466; COST-LABEL: 'fun49'467; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = urem i64 %a, 2468; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i64 %r469;470  %r = urem i64 %a, 2471  ret i64 %r472}473 474define i32 @fun50(i32 %a) {475; COST-LABEL: 'fun50'476; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = urem i32 %a, 8477; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r478;479  %r = urem i32 %a, 8480  ret i32 %r481}482 483define i16 @fun51(i16 %a) {484; COST-LABEL: 'fun51'485; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = urem i16 %a, 32486; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i16 %r487;488  %r = urem i16 %a, 32489  ret i16 %r490}491 492define i8 @fun52(i8 %a) {493; COST-LABEL: 'fun52'494; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = urem i8 %a, -128495; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret i8 %r496;497  %r = urem i8 %a, 128498  ret i8 %r499}500 501; Vector urem502 503define <2 x i64> @fun53(<2 x i64> %a) {504; COST-LABEL: 'fun53'505; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = urem <2 x i64> %a, splat (i64 2)506; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %r507;508  %r = urem <2 x i64> %a, <i64 2, i64 2>509  ret <2 x i64> %r510}511 512define <4 x i32> @fun54(<4 x i32> %a) {513; COST-LABEL: 'fun54'514; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = urem <4 x i32> %a, splat (i32 8)515; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %r516;517  %r = urem <4 x i32> %a, <i32 8, i32 8, i32 8, i32 8>518  ret <4 x i32> %r519}520 521define <2 x i32> @fun55(<2 x i32> %a) {522; COST-LABEL: 'fun55'523; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = urem <2 x i32> %a, splat (i32 8)524; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i32> %r525;526  %r = urem <2 x i32> %a, <i32 8, i32 8>527  ret <2 x i32> %r528}529 530define <8 x i16> @fun56(<8 x i16> %a) {531; COST-LABEL: 'fun56'532; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = urem <8 x i16> %a, splat (i16 32)533; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %r534;535  %r = urem <8 x i16> %a, <i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32>536  ret <8 x i16> %r537}538 539define <4 x i16> @fun57(<4 x i16> %a) {540; COST-LABEL: 'fun57'541; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = urem <4 x i16> %a, splat (i16 32)542; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i16> %r543;544  %r = urem <4 x i16> %a, <i16 32, i16 32, i16 32, i16 32>545  ret <4 x i16> %r546}547 548define <16 x i8> @fun58(<16 x i8> %a) {549; COST-LABEL: 'fun58'550; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = urem <16 x i8> %a, splat (i8 -128)551; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %r552;553  %r = urem <16 x i8> %a, <i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128>554  ret <16 x i8> %r555}556 557define <8 x i8> @fun59(<8 x i8> %a) {558; COST-LABEL: 'fun59'559; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %r = urem <8 x i8> %a, splat (i8 -128)560; COST-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i8> %r561;562  %r = urem <8 x i8> %a, <i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128>563  ret <8 x i8> %r564}565