478 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 22; RUN: opt < %s -mtriple=riscv64 -mattr=+v,+f,+d -disable-output -passes="print<cost-model>" 2>&1 | FileCheck %s3 4define <2 x i8> @phi_v2i8_small(i1 %c) {5; CHECK-LABEL: 'phi_v2i8_small'6; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b7; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d8; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d9; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <2 x i8> [ <i8 1, i8 -1>, %a ], [ <i8 -1, i8 1>, %b ]10; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i8> %x11;12 br i1 %c, label %a, label %b13a:14 br label %d15b:16 br label %d17d:18 %x = phi <2 x i8> [<i8 1, i8 -1>, %a], [<i8 -1, i8 1>, %b]19 ret <2 x i8> %x20}21 22define <4 x i8> @phi_v4i8_splat(i1 %c) {23; CHECK-LABEL: 'phi_v4i8_splat'24; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b25; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d26; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d27; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i8> [ splat (i8 1), %a ], [ splat (i8 2), %b ]28; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i8> %x29;30 br i1 %c, label %a, label %b31a:32 br label %d33b:34 br label %d35d:36 %x = phi <4 x i8> [<i8 1, i8 1, i8 1, i8 1>, %a], [<i8 2, i8 2, i8 2, i8 2>, %b]37 ret <4 x i8> %x38}39 40define <4 x i8> @phi_v4i8_small(i1 %c) {41; CHECK-LABEL: 'phi_v4i8_small'42; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b43; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d44; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d45; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i8> [ <i8 1, i8 2, i8 3, i8 4>, %a ], [ <i8 2, i8 4, i8 6, i8 8>, %b ]46; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i8> %x47;48 br i1 %c, label %a, label %b49a:50 br label %d51b:52 br label %d53d:54 %x = phi <4 x i8> [<i8 1, i8 2, i8 3, i8 4>, %a], [<i8 2, i8 4, i8 6, i8 8>, %b]55 ret <4 x i8> %x56}57 58define <4 x i8> @phi_v4i8_large(i1 %c) {59; CHECK-LABEL: 'phi_v4i8_large'60; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b61; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d62; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d63; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i8> [ <i8 -46, i8 -31, i8 15, i8 74>, %a ], [ <i8 8, i8 32, i8 -59, i8 12>, %b ]64; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i8> %x65;66 br i1 %c, label %a, label %b67a:68 br label %d69b:70 br label %d71d:72 %x = phi <4 x i8> [<i8 1234, i8 4321, i8 9999, i8 2378>, %a], [<i8 7432, i8 -4832, i8 381381, i8 12>, %b]73 ret <4 x i8> %x74}75 76; The cost should be conservative and assume it will need to materialize the more expensive constant77define <4 x i8> @phi_v4i8_cheap_and_expensive(i1 %c) {78; CHECK-LABEL: 'phi_v4i8_cheap_and_expensive'79; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b80; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d81; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d82; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i8> [ splat (i8 1), %a ], [ <i8 8, i8 32, i8 -59, i8 12>, %b ]83; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i8> %x84;85 br i1 %c, label %a, label %b86a:87 br label %d88b:89 br label %d90d:91 %x = phi <4 x i8> [<i8 1, i8 1, i8 1, i8 1>, %a], [<i8 7432, i8 -4832, i8 381381, i8 12>, %b]92 ret <4 x i8> %x93}94 95define <4 x i16> @phi_v4i16_splat(i1 %c) {96; CHECK-LABEL: 'phi_v4i16_splat'97; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b98; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d99; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d100; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i16> [ splat (i16 1), %a ], [ splat (i16 2), %b ]101; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %x102;103 br i1 %c, label %a, label %b104a:105 br label %d106b:107 br label %d108d:109 %x = phi <4 x i16> [<i16 1, i16 1, i16 1, i16 1>, %a], [<i16 2, i16 2, i16 2, i16 2>, %b]110 ret <4 x i16> %x111}112 113define <4 x i16> @phi_v4i16_small(i1 %c) {114; CHECK-LABEL: 'phi_v4i16_small'115; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b116; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d117; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d118; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i16> [ <i16 1, i16 2, i16 3, i16 4>, %a ], [ <i16 2, i16 4, i16 6, i16 8>, %b ]119; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %x120;121 br i1 %c, label %a, label %b122a:123 br label %d124b:125 br label %d126d:127 %x = phi <4 x i16> [<i16 1, i16 2, i16 3, i16 4>, %a], [<i16 2, i16 4, i16 6, i16 8>, %b]128 ret <4 x i16> %x129}130 131define <4 x i16> @phi_v4i16_large(i1 %c) {132; CHECK-LABEL: 'phi_v4i16_large'133; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b134; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d135; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d136; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i16> [ <i16 1234, i16 4321, i16 9999, i16 2378>, %a ], [ <i16 7432, i16 -4832, i16 -11835, i16 12>, %b ]137; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %x138;139 br i1 %c, label %a, label %b140a:141 br label %d142b:143 br label %d144d:145 %x = phi <4 x i16> [<i16 1234, i16 4321, i16 9999, i16 2378>, %a], [<i16 7432, i16 -4832, i16 381381, i16 12>, %b]146 ret <4 x i16> %x147}148 149; The cost should be conservative and assume it will need to materialize the more expensive constant150define <4 x i16> @phi_v4i16_cheap_and_expensive(i1 %c) {151; CHECK-LABEL: 'phi_v4i16_cheap_and_expensive'152; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b153; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d154; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d155; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i16> [ splat (i16 1), %a ], [ <i16 7432, i16 -4832, i16 -11835, i16 12>, %b ]156; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %x157;158 br i1 %c, label %a, label %b159a:160 br label %d161b:162 br label %d163d:164 %x = phi <4 x i16> [<i16 1, i16 1, i16 1, i16 1>, %a], [<i16 7432, i16 -4832, i16 381381, i16 12>, %b]165 ret <4 x i16> %x166}167 168define <4 x i32> @phi_v4i32_splat(i1 %c) {169; CHECK-LABEL: 'phi_v4i32_splat'170; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b171; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d172; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d173; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i32> [ splat (i32 1), %a ], [ splat (i32 2), %b ]174; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x175;176 br i1 %c, label %a, label %b177a:178 br label %d179b:180 br label %d181d:182 %x = phi <4 x i32> [<i32 1, i32 1, i32 1, i32 1>, %a], [<i32 2, i32 2, i32 2, i32 2>, %b]183 ret <4 x i32> %x184}185 186define <4 x i32> @phi_v4i32_small(i1 %c) {187; CHECK-LABEL: 'phi_v4i32_small'188; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b189; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d190; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d191; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %a ], [ <i32 2, i32 4, i32 6, i32 8>, %b ]192; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x193;194 br i1 %c, label %a, label %b195a:196 br label %d197b:198 br label %d199d:200 %x = phi <4 x i32> [<i32 1, i32 2, i32 3, i32 4>, %a], [<i32 2, i32 4, i32 6, i32 8>, %b]201 ret <4 x i32> %x202}203 204define <4 x i32> @phi_v4i32_large(i1 %c) {205; CHECK-LABEL: 'phi_v4i32_large'206; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b207; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d208; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d209; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i32> [ <i32 1234, i32 4321, i32 9999, i32 2378>, %a ], [ <i32 7432, i32 -4832, i32 381381, i32 12>, %b ]210; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x211;212 br i1 %c, label %a, label %b213a:214 br label %d215b:216 br label %d217d:218 %x = phi <4 x i32> [<i32 1234, i32 4321, i32 9999, i32 2378>, %a], [<i32 7432, i32 -4832, i32 381381, i32 12>, %b]219 ret <4 x i32> %x220}221 222; The cost should be conservative and assume it will need to materialize the more expensive constant223define <4 x i32> @phi_v4i32_cheap_and_expensive(i1 %c) {224; CHECK-LABEL: 'phi_v4i32_cheap_and_expensive'225; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b226; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d227; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d228; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i32> [ splat (i32 1), %a ], [ <i32 7432, i32 -4832, i32 381381, i32 12>, %b ]229; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x230;231 br i1 %c, label %a, label %b232a:233 br label %d234b:235 br label %d236d:237 %x = phi <4 x i32> [<i32 1, i32 1, i32 1, i32 1>, %a], [<i32 7432, i32 -4832, i32 381381, i32 12>, %b]238 ret <4 x i32> %x239}240 241define <4 x i64> @phi_v4i64_splat(i1 %c) {242; CHECK-LABEL: 'phi_v4i64_splat'243; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b244; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d245; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d246; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i64> [ splat (i64 1), %a ], [ splat (i64 2), %b ]247; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %x248;249 br i1 %c, label %a, label %b250a:251 br label %d252b:253 br label %d254d:255 %x = phi <4 x i64> [<i64 1, i64 1, i64 1, i64 1>, %a], [<i64 2, i64 2, i64 2, i64 2>, %b]256 ret <4 x i64> %x257}258 259define <4 x i64> @phi_v4i64_small(i1 %c) {260; CHECK-LABEL: 'phi_v4i64_small'261; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b262; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d263; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d264; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i64> [ <i64 1, i64 2, i64 3, i64 4>, %a ], [ <i64 2, i64 4, i64 6, i64 8>, %b ]265; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %x266;267 br i1 %c, label %a, label %b268a:269 br label %d270b:271 br label %d272d:273 %x = phi <4 x i64> [<i64 1, i64 2, i64 3, i64 4>, %a], [<i64 2, i64 4, i64 6, i64 8>, %b]274 ret <4 x i64> %x275}276 277define <4 x i64> @phi_v4i64_large(i1 %c) {278; CHECK-LABEL: 'phi_v4i64_large'279; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b280; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d281; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d282; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i64> [ <i64 1234, i64 4321, i64 9999, i64 2378>, %a ], [ <i64 7432, i64 -4832, i64 381381, i64 12>, %b ]283; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %x284;285 br i1 %c, label %a, label %b286a:287 br label %d288b:289 br label %d290d:291 %x = phi <4 x i64> [<i64 1234, i64 4321, i64 9999, i64 2378>, %a], [<i64 7432, i64 -4832, i64 381381, i64 12>, %b]292 ret <4 x i64> %x293}294 295; The cost should be conservative and assume it will need to materialize the more expensive constant296define <4 x i64> @phi_v4i64_cheap_and_expensive(i1 %c) {297; CHECK-LABEL: 'phi_v4i64_cheap_and_expensive'298; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b299; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d300; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d301; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i64> [ splat (i64 1), %a ], [ <i64 7432, i64 -4832, i64 381381, i64 12>, %b ]302; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %x303;304 br i1 %c, label %a, label %b305a:306 br label %d307b:308 br label %d309d:310 %x = phi <4 x i64> [<i64 1, i64 1, i64 1, i64 1>, %a], [<i64 7432, i64 -4832, i64 381381, i64 12>, %b]311 ret <4 x i64> %x312}313 314define <4 x half> @phi_v4f16_splat(i1 %c) {315; CHECK-LABEL: 'phi_v4f16_splat'316; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b317; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d318; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d319; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x half> [ splat (half 0xH3C00), %a ], [ <half 0xH4000, half 0xH4000, half 0xH4000, half 0xH4D00>, %b ]320; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x half> %x321;322 br i1 %c, label %a, label %b323a:324 br label %d325b:326 br label %d327d:328 %x = phi <4 x half> [<half 1.0, half 1.0, half 1.0, half 1.0>, %a], [<half 2.0, half 2.0, half 2.0, half 20.>, %b]329 ret <4 x half> %x330}331 332define <4 x half> @phi_v4f16(i1 %c) {333; CHECK-LABEL: 'phi_v4f16'334; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b335; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d336; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d337; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x half> [ <half 0xH3C00, half 0xH4000, half 0xH4200, half 0xH4400>, %a ], [ <half 0xH4000, half 0xH4400, half 0xH4600, half 0xH4800>, %b ]338; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x half> %x339;340 br i1 %c, label %a, label %b341a:342 br label %d343b:344 br label %d345d:346 %x = phi <4 x half> [<half 1.0, half 2.0, half 3.0, half 4.0>, %a], [<half 2.0, half 4.0, half 6.0, half 8.0>, %b]347 ret <4 x half> %x348}349 350; The cost should be conservative and assume it will need to materialize the more expensive constant351define <4 x half> @phi_v4f16_cheap_and_expensive(i1 %c) {352; CHECK-LABEL: 'phi_v4f16_cheap_and_expensive'353; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b354; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d355; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d356; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x half> [ splat (half 0xH3C00), %a ], [ <half 0xH6F42, half 0xHECB8, half 0xH5DF6, half 0xH4A40>, %b ]357; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x half> %x358;359 br i1 %c, label %a, label %b360a:361 br label %d362b:363 br label %d364d:365 %x = phi <4 x half> [<half 1.0, half 1.0, half 1.0, half 1.0>, %a], [<half 7432.0, half -4832.0, half 381.5, half 12.5>, %b]366 ret <4 x half> %x367}368 369define <4 x float> @phi_v4f32_splat(i1 %c) {370; CHECK-LABEL: 'phi_v4f32_splat'371; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b372; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d373; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d374; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x float> [ splat (float 1.000000e+00), %a ], [ <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+01>, %b ]375; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %x376;377 br i1 %c, label %a, label %b378a:379 br label %d380b:381 br label %d382d:383 %x = phi <4 x float> [<float 1.0, float 1.0, float 1.0, float 1.0>, %a], [<float 2.0, float 2.0, float 2.0, float 20.>, %b]384 ret <4 x float> %x385}386 387define <4 x float> @phi_v4f32(i1 %c) {388; CHECK-LABEL: 'phi_v4f32'389; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b390; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d391; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d392; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x float> [ <float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00>, %a ], [ <float 2.000000e+00, float 4.000000e+00, float 6.000000e+00, float 8.000000e+00>, %b ]393; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %x394;395 br i1 %c, label %a, label %b396a:397 br label %d398b:399 br label %d400d:401 %x = phi <4 x float> [<float 1.0, float 2.0, float 3.0, float 4.0>, %a], [<float 2.0, float 4.0, float 6.0, float 8.0>, %b]402 ret <4 x float> %x403}404 405; The cost should be conservative and assume it will need to materialize the more expensive constant406define <4 x float> @phi_v4f32_cheap_and_expensive(i1 %c) {407; CHECK-LABEL: 'phi_v4f32_cheap_and_expensive'408; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b409; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d410; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d411; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x float> [ splat (float 1.000000e+00), %a ], [ <float 7.432000e+03, float -4.832000e+03, float 3.815000e+02, float 1.250000e+01>, %b ]412; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %x413;414 br i1 %c, label %a, label %b415a:416 br label %d417b:418 br label %d419d:420 %x = phi <4 x float> [<float 1.0, float 1.0, float 1.0, float 1.0>, %a], [<float 7432.0, float -4832.0, float 381.5, float 12.5>, %b]421 ret <4 x float> %x422}423 424define <4 x double> @phi_v4f64_splat(i1 %c) {425; CHECK-LABEL: 'phi_v4f64_splat'426; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b427; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d428; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d429; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x double> [ splat (double 1.000000e+00), %a ], [ <double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+01>, %b ]430; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x double> %x431;432 br i1 %c, label %a, label %b433a:434 br label %d435b:436 br label %d437d:438 %x = phi <4 x double> [<double 1.0, double 1.0, double 1.0, double 1.0>, %a], [<double 2.0, double 2.0, double 2.0, double 20.>, %b]439 ret <4 x double> %x440}441 442define <4 x double> @phi_v4f64(i1 %c) {443; CHECK-LABEL: 'phi_v4f64'444; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b445; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d446; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d447; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x double> [ <double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00>, %a ], [ <double 2.000000e+00, double 4.000000e+00, double 6.000000e+00, double 8.000000e+00>, %b ]448; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x double> %x449;450 br i1 %c, label %a, label %b451a:452 br label %d453b:454 br label %d455d:456 %x = phi <4 x double> [<double 1.0, double 2.0, double 3.0, double 4.0>, %a], [<double 2.0, double 4.0, double 6.0, double 8.0>, %b]457 ret <4 x double> %x458}459 460; The cost should be conservative and assume it will need to materialize the more expensive constant461define <4 x double> @phi_v4f64_cheap_and_expensive(i1 %c) {462; CHECK-LABEL: 'phi_v4f64_cheap_and_expensive'463; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %c, label %a, label %b464; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d465; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d466; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x double> [ splat (double 1.000000e+00), %a ], [ <double 7.432000e+03, double -4.832000e+03, double 3.815000e+02, double 1.250000e+01>, %b ]467; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x double> %x468;469 br i1 %c, label %a, label %b470a:471 br label %d472b:473 br label %d474d:475 %x = phi <4 x double> [<double 1.0, double 1.0, double 1.0, double 1.0>, %a], [<double 7432.0, double -4832.0, double 381.5, double 12.5>, %b]476 ret <4 x double> %x477}478