1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes='require<profile-summary>,function(codegenprepare)' -cgp-optimize-phi-types %s -S | FileCheck %s
4 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
5 target triple = "aarch64--linux-gnu"
7 define float @convphi1(ptr %s, ptr %d, i32 %n) {
8 ; CHECK-LABEL: @convphi1(
10 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
11 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
13 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
14 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
15 ; CHECK-NEXT: br label [[END:%.*]]
17 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
18 ; CHECK-NEXT: [[LD_BC:%.*]] = bitcast i32 [[LD]] to float
19 ; CHECK-NEXT: br label [[END]]
21 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[LS_BC]], [[THEN]] ], [ [[LD_BC]], [[ELSE]] ]
22 ; CHECK-NEXT: ret float [[PHI_TC]]
25 %cmp15 = icmp sgt i32 %n, 0
26 br i1 %cmp15, label %then, label %else
29 %ls = load i32, ptr %s, align 4
33 %ld = load i32, ptr %d, align 4
37 %phi = phi i32 [ %ls, %then ], [ %ld, %else ]
38 %b = bitcast i32 %phi to float
42 define float @convphi2(ptr %s, ptr %d, i32 %n) {
43 ; CHECK-LABEL: @convphi2(
45 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
46 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
48 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
49 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
50 ; CHECK-NEXT: br label [[END]]
52 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[LS_BC]], [[THEN]] ], [ undef, [[ENTRY:%.*]] ]
53 ; CHECK-NEXT: ret float [[PHI_TC]]
56 %cmp15 = icmp sgt i32 %n, 0
57 br i1 %cmp15, label %then, label %end
60 %ls = load i32, ptr %s, align 4
64 %phi = phi i32 [ %ls, %then ], [ undef, %entry ]
65 %b = bitcast i32 %phi to float
69 define float @convphi3(ptr %s, ptr %d, i32 %n, float %f) {
70 ; CHECK-LABEL: @convphi3(
72 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
73 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
75 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
76 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
77 ; CHECK-NEXT: br label [[END]]
79 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[LS_BC]], [[THEN]] ], [ [[F:%.*]], [[ENTRY:%.*]] ]
80 ; CHECK-NEXT: ret float [[PHI_TC]]
83 %cmp15 = icmp sgt i32 %n, 0
84 %fb = bitcast float %f to i32
85 br i1 %cmp15, label %then, label %end
88 %ls = load i32, ptr %s, align 4
92 %phi = phi i32 [ %ls, %then ], [ %fb, %entry ]
93 %b = bitcast i32 %phi to float
97 define void @convphi4(ptr %s, ptr %d, i32 %n, float %f) {
98 ; CHECK-LABEL: @convphi4(
100 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
101 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
103 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
104 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
105 ; CHECK-NEXT: br label [[END]]
107 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[LS_BC]], [[THEN]] ], [ [[F:%.*]], [[ENTRY:%.*]] ]
108 ; CHECK-NEXT: [[BC:%.*]] = bitcast float [[PHI_TC]] to i32
109 ; CHECK-NEXT: store i32 [[BC]], ptr [[D:%.*]], align 4
110 ; CHECK-NEXT: ret void
113 %cmp15 = icmp sgt i32 %n, 0
114 %fb = bitcast float %f to i32
115 br i1 %cmp15, label %then, label %end
118 %ls = load i32, ptr %s, align 4
122 %phi = phi i32 [ %ls, %then ], [ %fb, %entry ]
123 store i32 %phi, ptr %d
127 define i64 @convphi_d2i(ptr %s, ptr %d, i32 %n) {
128 ; CHECK-LABEL: @convphi_d2i(
130 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
131 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
133 ; CHECK-NEXT: [[LS:%.*]] = load double, ptr [[S:%.*]], align 4
134 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast double [[LS]] to i64
135 ; CHECK-NEXT: br label [[END:%.*]]
137 ; CHECK-NEXT: [[LD:%.*]] = load double, ptr [[D:%.*]], align 4
138 ; CHECK-NEXT: [[LD_BC:%.*]] = bitcast double [[LD]] to i64
139 ; CHECK-NEXT: br label [[END]]
141 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi i64 [ [[LS_BC]], [[THEN]] ], [ [[LD_BC]], [[ELSE]] ]
142 ; CHECK-NEXT: ret i64 [[PHI_TC]]
145 %cmp15 = icmp sgt i32 %n, 0
146 br i1 %cmp15, label %then, label %else
149 %ls = load double, ptr %s, align 4
153 %ld = load double, ptr %d, align 4
157 %phi = phi double [ %ls, %then ], [ %ld, %else ]
158 %b = bitcast double %phi to i64
162 define i32 @convphi_f2i(ptr %s, ptr %d, i32 %n) {
163 ; CHECK-LABEL: @convphi_f2i(
165 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
166 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
168 ; CHECK-NEXT: [[LS:%.*]] = load float, ptr [[S:%.*]], align 4
169 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast float [[LS]] to i32
170 ; CHECK-NEXT: br label [[END:%.*]]
172 ; CHECK-NEXT: [[LD:%.*]] = load float, ptr [[D:%.*]], align 4
173 ; CHECK-NEXT: [[LD_BC:%.*]] = bitcast float [[LD]] to i32
174 ; CHECK-NEXT: br label [[END]]
176 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi i32 [ [[LS_BC]], [[THEN]] ], [ [[LD_BC]], [[ELSE]] ]
177 ; CHECK-NEXT: ret i32 [[PHI_TC]]
180 %cmp15 = icmp sgt i32 %n, 0
181 br i1 %cmp15, label %then, label %else
184 %ls = load float, ptr %s, align 4
188 %ld = load float, ptr %d, align 4
192 %phi = phi float [ %ls, %then ], [ %ld, %else ]
193 %b = bitcast float %phi to i32
197 define i16 @convphi_h2i(ptr %s, ptr %d, i32 %n) {
198 ; CHECK-LABEL: @convphi_h2i(
200 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
201 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
203 ; CHECK-NEXT: [[LS:%.*]] = load half, ptr [[S:%.*]], align 4
204 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast half [[LS]] to i16
205 ; CHECK-NEXT: br label [[END:%.*]]
207 ; CHECK-NEXT: [[LD:%.*]] = load half, ptr [[D:%.*]], align 4
208 ; CHECK-NEXT: [[LD_BC:%.*]] = bitcast half [[LD]] to i16
209 ; CHECK-NEXT: br label [[END]]
211 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi i16 [ [[LS_BC]], [[THEN]] ], [ [[LD_BC]], [[ELSE]] ]
212 ; CHECK-NEXT: ret i16 [[PHI_TC]]
215 %cmp15 = icmp sgt i32 %n, 0
216 br i1 %cmp15, label %then, label %else
219 %ls = load half, ptr %s, align 4
223 %ld = load half, ptr %d, align 4
227 %phi = phi half [ %ls, %then ], [ %ld, %else ]
228 %b = bitcast half %phi to i16
232 define i128 @convphi_ld2i(ptr %s, ptr %d, i32 %n) {
233 ; CHECK-LABEL: @convphi_ld2i(
235 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
236 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
238 ; CHECK-NEXT: [[LS:%.*]] = load fp128, ptr [[S:%.*]], align 4
239 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast fp128 [[LS]] to i128
240 ; CHECK-NEXT: br label [[END:%.*]]
242 ; CHECK-NEXT: [[LD:%.*]] = load fp128, ptr [[D:%.*]], align 4
243 ; CHECK-NEXT: [[LD_BC:%.*]] = bitcast fp128 [[LD]] to i128
244 ; CHECK-NEXT: br label [[END]]
246 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi i128 [ [[LS_BC]], [[THEN]] ], [ [[LD_BC]], [[ELSE]] ]
247 ; CHECK-NEXT: ret i128 [[PHI_TC]]
250 %cmp15 = icmp sgt i32 %n, 0
251 br i1 %cmp15, label %then, label %else
254 %ls = load fp128, ptr %s, align 4
258 %ld = load fp128, ptr %d, align 4
262 %phi = phi fp128 [ %ls, %then ], [ %ld, %else ]
263 %b = bitcast fp128 %phi to i128
267 define <4 x i32> @convphi_4xf2i(ptr %s, ptr %d, i32 %n) {
268 ; CHECK-LABEL: @convphi_4xf2i(
270 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
271 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
273 ; CHECK-NEXT: [[LS:%.*]] = load <4 x float>, ptr [[S:%.*]], align 4
274 ; CHECK-NEXT: br label [[END:%.*]]
276 ; CHECK-NEXT: [[LD:%.*]] = load <4 x float>, ptr [[D:%.*]], align 4
277 ; CHECK-NEXT: br label [[END]]
279 ; CHECK-NEXT: [[PHI:%.*]] = phi <4 x float> [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ]
280 ; CHECK-NEXT: [[B:%.*]] = bitcast <4 x float> [[PHI]] to <4 x i32>
281 ; CHECK-NEXT: ret <4 x i32> [[B]]
284 %cmp15 = icmp sgt i32 %n, 0
285 br i1 %cmp15, label %then, label %else
288 %ls = load <4 x float>, ptr %s, align 4
292 %ld = load <4 x float>, ptr %d, align 4
296 %phi = phi <4 x float> [ %ls, %then ], [ %ld, %else ]
297 %b = bitcast <4 x float> %phi to <4 x i32>
301 define float @convphi_loop(ptr %s, ptr %d, i64 %n) {
302 ; CHECK-LABEL: @convphi_loop(
304 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i64 [[N:%.*]], 0
305 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
306 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
307 ; CHECK-NEXT: br i1 [[CMP15]], label [[LOOP:%.*]], label [[END:%.*]]
309 ; CHECK-NEXT: [[IV:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[LOOP]] ]
310 ; CHECK-NEXT: [[LPHI_TC:%.*]] = phi float [ [[LS_BC]], [[ENTRY]] ], [ [[LD_BC:%.*]], [[LOOP]] ]
311 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
312 ; CHECK-NEXT: [[LD_BC]] = bitcast i32 [[LD]] to float
313 ; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i64 [[IV]], 1
314 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[IV_NEXT]], [[N]]
315 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[END]], label [[LOOP]]
317 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ undef, [[ENTRY]] ], [ [[LPHI_TC]], [[LOOP]] ]
318 ; CHECK-NEXT: ret float [[PHI_TC]]
321 %cmp15 = icmp sgt i64 %n, 0
322 %ls = load i32, ptr %s, align 4
323 br i1 %cmp15, label %loop, label %end
326 %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
327 %lphi = phi i32 [ %ls, %entry ], [ %ld, %loop ]
328 %ld = load i32, ptr %d, align 4
329 %iv.next = add nuw nsw i64 %iv, 1
330 %exitcond = icmp eq i64 %iv.next, %n
331 br i1 %exitcond, label %end, label %loop
334 %phi = phi i32 [ undef, %entry ], [ %lphi, %loop ]
335 %b = bitcast i32 %phi to float
339 define float @convphi_loopdelayed(ptr %s, ptr %d, i64 %n) {
340 ; CHECK-LABEL: @convphi_loopdelayed(
342 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i64 [[N:%.*]], 0
343 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
344 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
345 ; CHECK-NEXT: br i1 [[CMP15]], label [[LOOP:%.*]], label [[END:%.*]]
347 ; CHECK-NEXT: [[IV:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[LOOP]] ]
348 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
349 ; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i64 [[IV]], 1
350 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[IV_NEXT]], [[N]]
351 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[END]], label [[LOOP]]
353 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ undef, [[ENTRY]] ], [ [[LS_BC]], [[LOOP]] ]
354 ; CHECK-NEXT: ret float [[PHI_TC]]
357 %cmp15 = icmp sgt i64 %n, 0
358 %ls = load i32, ptr %s, align 4
359 br i1 %cmp15, label %loop, label %end
362 %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
363 %lphi = phi i32 [ %ls, %entry ], [ %lphi, %loop ]
364 %ld = load i32, ptr %d, align 4
365 %iv.next = add nuw nsw i64 %iv, 1
366 %exitcond = icmp eq i64 %iv.next, %n
367 br i1 %exitcond, label %end, label %loop
370 %phi = phi i32 [ undef, %entry ], [ %lphi, %loop ]
371 %b = bitcast i32 %phi to float
375 define float @convphi_loopdelayed2(ptr %s, ptr %d, i64 %n) {
376 ; CHECK-LABEL: @convphi_loopdelayed2(
378 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i64 [[N:%.*]], 0
379 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
380 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
381 ; CHECK-NEXT: br i1 [[CMP15]], label [[LOOP:%.*]], label [[END:%.*]]
383 ; CHECK-NEXT: [[IV:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[LOOP]] ]
384 ; CHECK-NEXT: [[LPHI_TC:%.*]] = phi float [ [[LS_BC]], [[ENTRY]] ], [ [[LD_BC:%.*]], [[LOOP]] ]
385 ; CHECK-NEXT: [[LPHI2_TC:%.*]] = phi float [ undef, [[ENTRY]] ], [ [[LPHI_TC]], [[LOOP]] ]
386 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
387 ; CHECK-NEXT: [[LD_BC]] = bitcast i32 [[LD]] to float
388 ; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i64 [[IV]], 1
389 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[IV_NEXT]], [[N]]
390 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[END]], label [[LOOP]]
392 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ undef, [[ENTRY]] ], [ [[LPHI2_TC]], [[LOOP]] ]
393 ; CHECK-NEXT: ret float [[PHI_TC]]
396 %cmp15 = icmp sgt i64 %n, 0
397 %ls = load i32, ptr %s, align 4
398 br i1 %cmp15, label %loop, label %end
401 %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
402 %lphi = phi i32 [ %ls, %entry ], [ %ld, %loop ]
403 %lphi2 = phi i32 [ undef, %entry ], [ %lphi, %loop ]
404 %ld = load i32, ptr %d, align 4
405 %iv.next = add nuw nsw i64 %iv, 1
406 %exitcond = icmp eq i64 %iv.next, %n
407 br i1 %exitcond, label %end, label %loop
410 %phi = phi i32 [ undef, %entry ], [ %lphi2, %loop ]
411 %b = bitcast i32 %phi to float
415 define float @convphi_loopmore(ptr %s, ptr %d, i64 %n) {
416 ; CHECK-LABEL: @convphi_loopmore(
418 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[N:%.*]], 1
419 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
420 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
421 ; CHECK-NEXT: br i1 [[CMP]], label [[THEN:%.*]], label [[IFEND:%.*]]
423 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
424 ; CHECK-NEXT: [[LD_BC:%.*]] = bitcast i32 [[LD]] to float
425 ; CHECK-NEXT: br label [[IFEND]]
427 ; CHECK-NEXT: [[PHI1_TC:%.*]] = phi float [ [[LD_BC]], [[THEN]] ], [ [[LS_BC]], [[ENTRY:%.*]] ]
428 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i64 [[N]], 0
429 ; CHECK-NEXT: br i1 [[CMP15]], label [[LOOP:%.*]], label [[END:%.*]]
431 ; CHECK-NEXT: [[IV:%.*]] = phi i64 [ 0, [[IFEND]] ], [ [[IV_NEXT:%.*]], [[LOOPEND:%.*]] ]
432 ; CHECK-NEXT: [[PHI2_TC:%.*]] = phi float [ [[PHI1_TC]], [[IFEND]] ], [ [[PHI3_TC:%.*]], [[LOOPEND]] ]
433 ; CHECK-NEXT: [[TMP0:%.*]] = icmp eq i64 [[N]], 1
434 ; CHECK-NEXT: br i1 [[TMP0]], label [[LOOPTHEN:%.*]], label [[LOOPEND]]
436 ; CHECK-NEXT: [[LL:%.*]] = load i32, ptr [[D]], align 4
437 ; CHECK-NEXT: [[LL_BC:%.*]] = bitcast i32 [[LL]] to float
438 ; CHECK-NEXT: br label [[LOOPEND]]
440 ; CHECK-NEXT: [[PHI3_TC]] = phi float [ [[LL_BC]], [[LOOPTHEN]] ], [ [[PHI2_TC]], [[LOOP]] ]
441 ; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i64 [[IV]], 1
442 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[IV_NEXT]], [[N]]
443 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[END]], label [[LOOP]]
445 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[PHI1_TC]], [[IFEND]] ], [ [[PHI3_TC]], [[LOOPEND]] ]
446 ; CHECK-NEXT: ret float [[PHI_TC]]
449 %cmp = icmp eq i64 %n, 1
450 %ls = load i32, ptr %s, align 4
451 br i1 %cmp, label %then, label %ifend
454 %ld = load i32, ptr %d, align 4
458 %phi1 = phi i32 [ %ld, %then ], [ %ls, %entry ]
459 %cmp15 = icmp sgt i64 %n, 0
460 br i1 %cmp15, label %loop, label %end
463 %iv = phi i64 [ 0, %ifend ], [ %iv.next, %loopend ]
464 %phi2 = phi i32 [ %phi1, %ifend ], [ %phi3, %loopend ]
465 br i1 %cmp, label %loopthen, label %loopend
468 %ll = load i32, ptr %d, align 4
472 %phi3 = phi i32 [ %ll, %loopthen ], [ %phi2, %loop ]
473 %iv.next = add nuw nsw i64 %iv, 1
474 %exitcond = icmp eq i64 %iv.next, %n
475 br i1 %exitcond, label %end, label %loop
478 %phi = phi i32 [ %phi1, %ifend ], [ %phi3, %loopend ]
479 %b = bitcast i32 %phi to float
483 define void @convphi_stop(ptr %s, ptr %d, ptr %e, i32 %n) {
484 ; CHECK-LABEL: @convphi_stop(
486 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
487 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
489 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
490 ; CHECK-NEXT: br label [[END:%.*]]
492 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
493 ; CHECK-NEXT: br label [[END]]
495 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ]
496 ; CHECK-NEXT: [[B:%.*]] = bitcast i32 [[PHI]] to float
497 ; CHECK-NEXT: store float [[B]], ptr [[E:%.*]], align 4
498 ; CHECK-NEXT: ret void
501 %cmp15 = icmp sgt i32 %n, 0
502 br i1 %cmp15, label %then, label %else
505 %ls = load i32, ptr %s, align 4
509 %ld = load i32, ptr %d, align 4
513 %phi = phi i32 [ %ls, %then ], [ %ld, %else ]
514 %b = bitcast i32 %phi to float
515 store float %b, ptr %e, align 4
519 define void @convphi_stop2(ptr %s, ptr %d, ptr %e, i32 %n) {
520 ; CHECK-LABEL: @convphi_stop2(
522 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
523 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
525 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
526 ; CHECK-NEXT: [[LSB:%.*]] = bitcast i32 [[LS]] to float
527 ; CHECK-NEXT: br label [[END:%.*]]
529 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
530 ; CHECK-NEXT: [[LDB:%.*]] = bitcast i32 [[LD]] to float
531 ; CHECK-NEXT: br label [[END]]
533 ; CHECK-NEXT: [[PHI:%.*]] = phi float [ [[LSB]], [[THEN]] ], [ [[LDB]], [[ELSE]] ]
534 ; CHECK-NEXT: store float [[PHI]], ptr [[E:%.*]], align 4
535 ; CHECK-NEXT: ret void
538 %cmp15 = icmp sgt i32 %n, 0
539 br i1 %cmp15, label %then, label %else
542 %ls = load i32, ptr %s, align 4
543 %lsb = bitcast i32 %ls to float
547 %ld = load i32, ptr %d, align 4
548 %ldb = bitcast i32 %ld to float
552 %phi = phi float [ %lsb, %then ], [ %ldb, %else ]
553 store float %phi, ptr %e, align 4
557 define float @convphi_stop3(ptr %s, ptr %d, ptr %e, i32 %n) {
558 ; CHECK-LABEL: @convphi_stop3(
560 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
561 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
563 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
564 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
565 ; CHECK-NEXT: br label [[END:%.*]]
567 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
568 ; CHECK-NEXT: [[LD_BC:%.*]] = bitcast i32 [[LD]] to float
569 ; CHECK-NEXT: br label [[END]]
571 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[LS_BC]], [[THEN]] ], [ [[LD_BC]], [[ELSE]] ]
572 ; CHECK-NEXT: store float [[PHI_TC]], ptr [[E:%.*]], align 4
573 ; CHECK-NEXT: ret float [[PHI_TC]]
576 %cmp15 = icmp sgt i32 %n, 0
577 br i1 %cmp15, label %then, label %else
580 %ls = load i32, ptr %s, align 4
584 %ld = load i32, ptr %d, align 4
588 %phi = phi i32 [ %ls, %then ], [ %ld, %else ]
589 %b = bitcast i32 %phi to float
590 store float %b, ptr %e, align 4
594 define void @convphi_stop4(ptr %s, ptr %d, ptr %e, i32 %n) {
595 ; CHECK-LABEL: @convphi_stop4(
597 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
598 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
599 ; CHECK-NEXT: [[LD_BC:%.*]] = bitcast i32 [[LD]] to float
600 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
602 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
603 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
604 ; CHECK-NEXT: br label [[END]]
606 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[LS_BC]], [[THEN]] ], [ [[LD_BC]], [[ENTRY:%.*]] ]
607 ; CHECK-NEXT: [[TMP0:%.*]] = icmp sgt i32 [[N]], 0
608 ; CHECK-NEXT: [[BC:%.*]] = bitcast float [[PHI_TC]] to i32
609 ; CHECK-NEXT: store i32 [[BC]], ptr [[S]], align 4
610 ; CHECK-NEXT: br i1 [[TMP0]], label [[THEN2:%.*]], label [[END2:%.*]]
612 ; CHECK-NEXT: [[LF:%.*]] = load float, ptr [[E:%.*]], align 4
613 ; CHECK-NEXT: br label [[END2]]
615 ; CHECK-NEXT: [[PHI2:%.*]] = phi float [ [[PHI_TC]], [[END]] ], [ [[LF]], [[THEN2]] ]
616 ; CHECK-NEXT: store float [[PHI2]], ptr [[E]], align 4
617 ; CHECK-NEXT: ret void
620 %cmp15 = icmp sgt i32 %n, 0
621 %ld = load i32, ptr %d, align 4
622 br i1 %cmp15, label %then, label %end
625 %ls = load i32, ptr %s, align 4
629 %phi = phi i32 [ %ls, %then ], [ %ld, %entry ]
630 %phib = bitcast i32 %phi to float
631 store i32 %phi, ptr %s, align 4
632 br i1 %cmp15, label %then2, label %end2
635 %lf = load float, ptr %e, align 4
639 %phi2 = phi float [ %phib, %end ], [ %lf, %then2 ]
640 store float %phi2, ptr %e, align 4
644 define float @multiuse(ptr %s, ptr %d, i32 %n) {
645 ; CHECK-LABEL: @multiuse(
647 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
648 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
650 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
651 ; CHECK-NEXT: [[A:%.*]] = add i32 [[LS]], 2
652 ; CHECK-NEXT: store i32 [[A]], ptr [[D:%.*]], align 4
653 ; CHECK-NEXT: br label [[END:%.*]]
655 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D]], align 4
656 ; CHECK-NEXT: br label [[END]]
658 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ]
659 ; CHECK-NEXT: [[B:%.*]] = bitcast i32 [[PHI]] to float
660 ; CHECK-NEXT: ret float [[B]]
663 %cmp15 = icmp sgt i32 %n, 0
664 br i1 %cmp15, label %then, label %else
667 %ls = load i32, ptr %s, align 4
669 store i32 %a, ptr %d, align 4
673 %ld = load i32, ptr %d, align 4
677 %phi = phi i32 [ %ls, %then ], [ %ld, %else ]
678 %b = bitcast i32 %phi to float
682 define float @convphi_volatile(ptr %s, ptr %d, i32 %n) {
683 ; CHECK-LABEL: @convphi_volatile(
685 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
686 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
688 ; CHECK-NEXT: [[LS:%.*]] = load volatile i32, ptr [[S:%.*]], align 4
689 ; CHECK-NEXT: br label [[END:%.*]]
691 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
692 ; CHECK-NEXT: br label [[END]]
694 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ]
695 ; CHECK-NEXT: [[B:%.*]] = bitcast i32 [[PHI]] to float
696 ; CHECK-NEXT: ret float [[B]]
698 ; DEBUG-LABEL: @convphi_volatile(
700 ; DEBUG-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0, !dbg !358
701 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i1 [[CMP15]], metadata !353, metadata !DIExpression()), !dbg !358
702 ; DEBUG-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]], !dbg !359
704 ; DEBUG-NEXT: [[LS:%.*]] = load volatile i32, ptr [[S:%.*]], align 4, !dbg !360
705 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[LS]], metadata !354, metadata !DIExpression()), !dbg !360
706 ; DEBUG-NEXT: br label [[END:%.*]], !dbg !361
708 ; DEBUG-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4, !dbg !362
709 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[LD]], metadata !355, metadata !DIExpression()), !dbg !362
710 ; DEBUG-NEXT: br label [[END]], !dbg !363
712 ; DEBUG-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ], !dbg !364
713 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[PHI]], metadata !356, metadata !DIExpression()), !dbg !364
714 ; DEBUG-NEXT: [[B:%.*]] = bitcast i32 [[PHI]] to float, !dbg !365
715 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata float [[B]], metadata !357, metadata !DIExpression()), !dbg !365
716 ; DEBUG-NEXT: ret float [[B]], !dbg !366
718 %cmp15 = icmp sgt i32 %n, 0
719 br i1 %cmp15, label %then, label %else
722 %ls = load volatile i32, ptr %s, align 4
726 %ld = load i32, ptr %d, align 4
730 %phi = phi i32 [ %ls, %then ], [ %ld, %else ]
731 %b = bitcast i32 %phi to float
735 define void @convphi_volatile2(ptr %s, ptr %d, i32 %n, float %f) {
736 ; CHECK-LABEL: @convphi_volatile2(
738 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
739 ; CHECK-NEXT: [[FB:%.*]] = bitcast float [[F:%.*]] to i32
740 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
742 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
743 ; CHECK-NEXT: br label [[END]]
745 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[FB]], [[ENTRY:%.*]] ]
746 ; CHECK-NEXT: store volatile i32 [[PHI]], ptr [[D:%.*]], align 4
747 ; CHECK-NEXT: ret void
749 ; DEBUG-LABEL: @convphi_volatile2(
751 ; DEBUG-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0, !dbg !373
752 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i1 [[CMP15]], metadata !369, metadata !DIExpression()), !dbg !373
753 ; DEBUG-NEXT: [[FB:%.*]] = bitcast float [[F:%.*]] to i32, !dbg !374
754 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[FB]], metadata !370, metadata !DIExpression()), !dbg !374
755 ; DEBUG-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]], !dbg !375
757 ; DEBUG-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4, !dbg !376
758 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[LS]], metadata !371, metadata !DIExpression()), !dbg !376
759 ; DEBUG-NEXT: br label [[END]], !dbg !377
761 ; DEBUG-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[FB]], [[ENTRY:%.*]] ], !dbg !378
762 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[PHI]], metadata !372, metadata !DIExpression()), !dbg !378
763 ; DEBUG-NEXT: store volatile i32 [[PHI]], ptr [[D:%.*]], align 4, !dbg !379
764 ; DEBUG-NEXT: ret void, !dbg !380
766 %cmp15 = icmp sgt i32 %n, 0
767 %fb = bitcast float %f to i32
768 br i1 %cmp15, label %then, label %end
771 %ls = load i32, ptr %s, align 4
775 %phi = phi i32 [ %ls, %then ], [ %fb, %entry ]
776 store volatile i32 %phi, ptr %d
780 define float @convphi_atomic(ptr %s, ptr %d, i32 %n) {
781 ; CHECK-LABEL: @convphi_atomic(
783 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
784 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
786 ; CHECK-NEXT: [[LS:%.*]] = load atomic i32, ptr [[S:%.*]] acquire, align 4
787 ; CHECK-NEXT: br label [[END:%.*]]
789 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
790 ; CHECK-NEXT: br label [[END]]
792 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ]
793 ; CHECK-NEXT: [[B:%.*]] = bitcast i32 [[PHI]] to float
794 ; CHECK-NEXT: ret float [[B]]
796 ; DEBUG-LABEL: @convphi_atomic(
798 ; DEBUG-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0, !dbg !388
799 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i1 [[CMP15]], metadata !383, metadata !DIExpression()), !dbg !388
800 ; DEBUG-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]], !dbg !389
802 ; DEBUG-NEXT: [[LS:%.*]] = load atomic i32, ptr [[S:%.*]] acquire, align 4, !dbg !390
803 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[LS]], metadata !384, metadata !DIExpression()), !dbg !390
804 ; DEBUG-NEXT: br label [[END:%.*]], !dbg !391
806 ; DEBUG-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4, !dbg !392
807 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[LD]], metadata !385, metadata !DIExpression()), !dbg !392
808 ; DEBUG-NEXT: br label [[END]], !dbg !393
810 ; DEBUG-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ], !dbg !394
811 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[PHI]], metadata !386, metadata !DIExpression()), !dbg !394
812 ; DEBUG-NEXT: [[B:%.*]] = bitcast i32 [[PHI]] to float, !dbg !395
813 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata float [[B]], metadata !387, metadata !DIExpression()), !dbg !395
814 ; DEBUG-NEXT: ret float [[B]], !dbg !396
816 %cmp15 = icmp sgt i32 %n, 0
817 br i1 %cmp15, label %then, label %else
820 %ls = load atomic i32, ptr %s acquire, align 4
824 %ld = load i32, ptr %d, align 4
828 %phi = phi i32 [ %ls, %then ], [ %ld, %else ]
829 %b = bitcast i32 %phi to float
833 define void @convphi_atomic2(ptr %s, ptr %d, i32 %n, float %f) {
834 ; CHECK-LABEL: @convphi_atomic2(
836 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
837 ; CHECK-NEXT: [[FB:%.*]] = bitcast float [[F:%.*]] to i32
838 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
840 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
841 ; CHECK-NEXT: br label [[END]]
843 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[FB]], [[ENTRY:%.*]] ]
844 ; CHECK-NEXT: store atomic i32 [[PHI]], ptr [[D:%.*]] release, align 4
845 ; CHECK-NEXT: ret void
847 ; DEBUG-LABEL: @convphi_atomic2(
849 ; DEBUG-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0, !dbg !403
850 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i1 [[CMP15]], metadata !399, metadata !DIExpression()), !dbg !403
851 ; DEBUG-NEXT: [[FB:%.*]] = bitcast float [[F:%.*]] to i32, !dbg !404
852 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[FB]], metadata !400, metadata !DIExpression()), !dbg !404
853 ; DEBUG-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]], !dbg !405
855 ; DEBUG-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4, !dbg !406
856 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[LS]], metadata !401, metadata !DIExpression()), !dbg !406
857 ; DEBUG-NEXT: br label [[END]], !dbg !407
859 ; DEBUG-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[FB]], [[ENTRY:%.*]] ], !dbg !408
860 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[PHI]], metadata !402, metadata !DIExpression()), !dbg !408
861 ; DEBUG-NEXT: store atomic i32 [[PHI]], ptr [[D:%.*]] release, align 4, !dbg !409
862 ; DEBUG-NEXT: ret void, !dbg !410
864 %cmp15 = icmp sgt i32 %n, 0
865 %fb = bitcast float %f to i32
866 br i1 %cmp15, label %then, label %end
869 %ls = load i32, ptr %s, align 4
873 %phi = phi i32 [ %ls, %then ], [ %fb, %entry ]
874 store atomic i32 %phi, ptr %d release, align 4
878 define float @convphi2_zero(ptr %s, ptr %d, i32 %n) {
879 ; CHECK-LABEL: @convphi2_zero(
881 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
882 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
884 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
885 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
886 ; CHECK-NEXT: br label [[END]]
888 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[LS_BC]], [[THEN]] ], [ 0.000000e+00, [[ENTRY:%.*]] ]
889 ; CHECK-NEXT: ret float [[PHI_TC]]
892 %cmp15 = icmp sgt i32 %n, 0
893 br i1 %cmp15, label %then, label %end
896 %ls = load i32, ptr %s, align 4
900 %phi = phi i32 [ %ls, %then ], [ 0, %entry ]
901 %b = bitcast i32 %phi to float
905 define i32 @convphi2f_zero(ptr %s, ptr %d, i32 %n) {
906 ; CHECK-LABEL: @convphi2f_zero(
908 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
909 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
911 ; CHECK-NEXT: [[LS:%.*]] = load float, ptr [[S:%.*]], align 4
912 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast float [[LS]] to i32
913 ; CHECK-NEXT: br label [[END]]
915 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi i32 [ [[LS_BC]], [[THEN]] ], [ 0, [[ENTRY:%.*]] ]
916 ; CHECK-NEXT: ret i32 [[PHI_TC]]
919 %cmp15 = icmp sgt i32 %n, 0
920 br i1 %cmp15, label %then, label %end
923 %ls = load float, ptr %s, align 4
927 %phi = phi float [ %ls, %then ], [ 0.0, %entry ]
928 %b = bitcast float %phi to i32
932 define float @convphi2_ten(ptr %s, ptr %d, i32 %n) {
933 ; CHECK-LABEL: @convphi2_ten(
935 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
936 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
938 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
939 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
940 ; CHECK-NEXT: br label [[END]]
942 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[LS_BC]], [[THEN]] ], [ 0x36D4000000000000, [[ENTRY:%.*]] ]
943 ; CHECK-NEXT: ret float [[PHI_TC]]
946 %cmp15 = icmp sgt i32 %n, 0
947 br i1 %cmp15, label %then, label %end
950 %ls = load i32, ptr %s, align 4
954 %phi = phi i32 [ %ls, %then ], [ 10, %entry ]
955 %b = bitcast i32 %phi to float
959 define i32 @convphi2f_ten(ptr %s, ptr %d, i32 %n) {
960 ; CHECK-LABEL: @convphi2f_ten(
962 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
963 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
965 ; CHECK-NEXT: [[LS:%.*]] = load float, ptr [[S:%.*]], align 4
966 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast float [[LS]] to i32
967 ; CHECK-NEXT: br label [[END]]
969 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi i32 [ [[LS_BC]], [[THEN]] ], [ 1092616192, [[ENTRY:%.*]] ]
970 ; CHECK-NEXT: ret i32 [[PHI_TC]]
973 %cmp15 = icmp sgt i32 %n, 0
974 br i1 %cmp15, label %then, label %end
977 %ls = load float, ptr %s, align 4
981 %phi = phi float [ %ls, %then ], [ 10.0, %entry ]
982 %b = bitcast float %phi to i32