1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 2
2 ; RUN: opt < %s -mtriple=riscv64 -mattr=+v,+f,+d -disable-output -passes="print<cost-model>" 2>&1 | FileCheck %s
4 define <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 %b
7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
9 ; 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> %x
12 br i1 %c, label %a, label %b
18 %x = phi <2 x i8> [<i8 1, i8 -1>, %a], [<i8 -1, i8 1>, %b]
22 define <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 %b
25 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
26 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
27 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i8> [ <i8 1, i8 1, i8 1, i8 1>, %a ], [ <i8 2, i8 2, i8 2, i8 2>, %b ]
28 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i8> %x
30 br i1 %c, label %a, label %b
36 %x = phi <4 x i8> [<i8 1, i8 1, i8 1, i8 1>, %a], [<i8 2, i8 2, i8 2, i8 2>, %b]
40 define <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 %b
43 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
44 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
45 ; 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> %x
48 br i1 %c, label %a, label %b
54 %x = phi <4 x i8> [<i8 1, i8 2, i8 3, i8 4>, %a], [<i8 2, i8 4, i8 6, i8 8>, %b]
58 define <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 %b
61 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
62 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
63 ; 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> %x
66 br i1 %c, label %a, label %b
72 %x = phi <4 x i8> [<i8 1234, i8 4321, i8 9999, i8 2378>, %a], [<i8 7432, i8 -4832, i8 381381, i8 12>, %b]
76 ; The cost should be conservative and assume it will need to materialize the more expensive constant
77 define <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 %b
80 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
81 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
82 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i8> [ <i8 1, i8 1, i8 1, 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> %x
85 br i1 %c, label %a, label %b
91 %x = phi <4 x i8> [<i8 1, i8 1, i8 1, i8 1>, %a], [<i8 7432, i8 -4832, i8 381381, i8 12>, %b]
95 define <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 %b
98 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
99 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
100 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i16> [ <i16 1, i16 1, i16 1, i16 1>, %a ], [ <i16 2, i16 2, i16 2, i16 2>, %b ]
101 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %x
103 br i1 %c, label %a, label %b
109 %x = phi <4 x i16> [<i16 1, i16 1, i16 1, i16 1>, %a], [<i16 2, i16 2, i16 2, i16 2>, %b]
113 define <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 %b
116 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
117 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
118 ; 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> %x
121 br i1 %c, label %a, label %b
127 %x = phi <4 x i16> [<i16 1, i16 2, i16 3, i16 4>, %a], [<i16 2, i16 4, i16 6, i16 8>, %b]
131 define <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 %b
134 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
135 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
136 ; 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> %x
139 br i1 %c, label %a, label %b
145 %x = phi <4 x i16> [<i16 1234, i16 4321, i16 9999, i16 2378>, %a], [<i16 7432, i16 -4832, i16 381381, i16 12>, %b]
149 ; The cost should be conservative and assume it will need to materialize the more expensive constant
150 define <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 %b
153 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
154 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
155 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i16> [ <i16 1, i16 1, i16 1, 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> %x
158 br i1 %c, label %a, label %b
164 %x = phi <4 x i16> [<i16 1, i16 1, i16 1, i16 1>, %a], [<i16 7432, i16 -4832, i16 381381, i16 12>, %b]
168 define <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 %b
171 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
172 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
173 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %a ], [ <i32 2, i32 2, i32 2, i32 2>, %b ]
174 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %x
176 br i1 %c, label %a, label %b
182 %x = phi <4 x i32> [<i32 1, i32 1, i32 1, i32 1>, %a], [<i32 2, i32 2, i32 2, i32 2>, %b]
186 define <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 %b
189 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
190 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
191 ; 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> %x
194 br i1 %c, label %a, label %b
200 %x = phi <4 x i32> [<i32 1, i32 2, i32 3, i32 4>, %a], [<i32 2, i32 4, i32 6, i32 8>, %b]
204 define <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 %b
207 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
208 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
209 ; 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> %x
212 br i1 %c, label %a, label %b
218 %x = phi <4 x i32> [<i32 1234, i32 4321, i32 9999, i32 2378>, %a], [<i32 7432, i32 -4832, i32 381381, i32 12>, %b]
222 ; The cost should be conservative and assume it will need to materialize the more expensive constant
223 define <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 %b
226 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
227 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
228 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i32> [ <i32 1, i32 1, i32 1, 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> %x
231 br i1 %c, label %a, label %b
237 %x = phi <4 x i32> [<i32 1, i32 1, i32 1, i32 1>, %a], [<i32 7432, i32 -4832, i32 381381, i32 12>, %b]
241 define <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 %b
244 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
245 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
246 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i64> [ <i64 1, i64 1, i64 1, i64 1>, %a ], [ <i64 2, i64 2, i64 2, i64 2>, %b ]
247 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %x
249 br i1 %c, label %a, label %b
255 %x = phi <4 x i64> [<i64 1, i64 1, i64 1, i64 1>, %a], [<i64 2, i64 2, i64 2, i64 2>, %b]
259 define <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 %b
262 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
263 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
264 ; 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> %x
267 br i1 %c, label %a, label %b
273 %x = phi <4 x i64> [<i64 1, i64 2, i64 3, i64 4>, %a], [<i64 2, i64 4, i64 6, i64 8>, %b]
277 define <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 %b
280 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
281 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
282 ; 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> %x
285 br i1 %c, label %a, label %b
291 %x = phi <4 x i64> [<i64 1234, i64 4321, i64 9999, i64 2378>, %a], [<i64 7432, i64 -4832, i64 381381, i64 12>, %b]
295 ; The cost should be conservative and assume it will need to materialize the more expensive constant
296 define <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 %b
299 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
300 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
301 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x i64> [ <i64 1, i64 1, i64 1, 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> %x
304 br i1 %c, label %a, label %b
310 %x = phi <4 x i64> [<i64 1, i64 1, i64 1, i64 1>, %a], [<i64 7432, i64 -4832, i64 381381, i64 12>, %b]
314 define <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 %b
317 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
318 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
319 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x half> [ <half 0xH3C00, half 0xH3C00, half 0xH3C00, 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> %x
322 br i1 %c, label %a, label %b
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]
332 define <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 %b
335 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
336 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
337 ; 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> %x
340 br i1 %c, label %a, label %b
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]
350 ; The cost should be conservative and assume it will need to materialize the more expensive constant
351 define <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 %b
354 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
355 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
356 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x half> [ <half 0xH3C00, half 0xH3C00, half 0xH3C00, 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> %x
359 br i1 %c, label %a, label %b
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]
369 define <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 %b
372 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
373 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
374 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x float> [ <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, 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> %x
377 br i1 %c, label %a, label %b
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]
387 define <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 %b
390 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
391 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
392 ; 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> %x
395 br i1 %c, label %a, label %b
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]
405 ; The cost should be conservative and assume it will need to materialize the more expensive constant
406 define <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 %b
409 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
410 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
411 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x float> [ <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, 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> %x
414 br i1 %c, label %a, label %b
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]
424 define <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 %b
427 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
428 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
429 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x double> [ <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, 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> %x
432 br i1 %c, label %a, label %b
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]
442 define <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 %b
445 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
446 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
447 ; 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> %x
450 br i1 %c, label %a, label %b
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]
460 ; The cost should be conservative and assume it will need to materialize the more expensive constant
461 define <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 %b
464 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
465 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %d
466 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %x = phi <4 x double> [ <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, 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> %x
469 br i1 %c, label %a, label %b
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]