1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -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: br i1 [[CMP15]], label [[LOOP:%.*]], label [[END:%.*]]
346 ; CHECK-NEXT: [[IV:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[LOOP]] ]
347 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
348 ; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i64 [[IV]], 1
349 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[IV_NEXT]], [[N]]
350 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[END]], label [[LOOP]]
352 ; CHECK-NEXT: [[B:%.*]] = bitcast i32 [[LS]] to float
353 ; CHECK-NEXT: ret float [[B]]
356 %cmp15 = icmp sgt i64 %n, 0
357 %ls = load i32, ptr %s, align 4
358 br i1 %cmp15, label %loop, label %end
361 %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
362 %lphi = phi i32 [ %ls, %entry ], [ %lphi, %loop ]
363 %ld = load i32, ptr %d, align 4
364 %iv.next = add nuw nsw i64 %iv, 1
365 %exitcond = icmp eq i64 %iv.next, %n
366 br i1 %exitcond, label %end, label %loop
369 %phi = phi i32 [ undef, %entry ], [ %lphi, %loop ]
370 %b = bitcast i32 %phi to float
374 define float @convphi_loopdelayed2(ptr %s, ptr %d, i64 %n) {
375 ; CHECK-LABEL: @convphi_loopdelayed2(
377 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i64 [[N:%.*]], 0
378 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
379 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
380 ; CHECK-NEXT: br i1 [[CMP15]], label [[LOOP:%.*]], label [[END:%.*]]
382 ; CHECK-NEXT: [[IV:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[LOOP]] ]
383 ; CHECK-NEXT: [[LPHI_TC:%.*]] = phi float [ [[LS_BC]], [[ENTRY]] ], [ [[LD_BC:%.*]], [[LOOP]] ]
384 ; CHECK-NEXT: [[LPHI2_TC:%.*]] = phi float [ undef, [[ENTRY]] ], [ [[LPHI_TC]], [[LOOP]] ]
385 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
386 ; CHECK-NEXT: [[LD_BC]] = bitcast i32 [[LD]] to float
387 ; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i64 [[IV]], 1
388 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[IV_NEXT]], [[N]]
389 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[END]], label [[LOOP]]
391 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ undef, [[ENTRY]] ], [ [[LPHI2_TC]], [[LOOP]] ]
392 ; CHECK-NEXT: ret float [[PHI_TC]]
395 %cmp15 = icmp sgt i64 %n, 0
396 %ls = load i32, ptr %s, align 4
397 br i1 %cmp15, label %loop, label %end
400 %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
401 %lphi = phi i32 [ %ls, %entry ], [ %ld, %loop ]
402 %lphi2 = phi i32 [ undef, %entry ], [ %lphi, %loop ]
403 %ld = load i32, ptr %d, align 4
404 %iv.next = add nuw nsw i64 %iv, 1
405 %exitcond = icmp eq i64 %iv.next, %n
406 br i1 %exitcond, label %end, label %loop
409 %phi = phi i32 [ undef, %entry ], [ %lphi2, %loop ]
410 %b = bitcast i32 %phi to float
414 define float @convphi_loopmore(ptr %s, ptr %d, i64 %n) {
415 ; CHECK-LABEL: @convphi_loopmore(
417 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[N:%.*]], 1
418 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
419 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
420 ; CHECK-NEXT: br i1 [[CMP]], label [[THEN:%.*]], label [[IFEND:%.*]]
422 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
423 ; CHECK-NEXT: [[LD_BC:%.*]] = bitcast i32 [[LD]] to float
424 ; CHECK-NEXT: br label [[IFEND]]
426 ; CHECK-NEXT: [[PHI1_TC:%.*]] = phi float [ [[LD_BC]], [[THEN]] ], [ [[LS_BC]], [[ENTRY:%.*]] ]
427 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i64 [[N]], 0
428 ; CHECK-NEXT: br i1 [[CMP15]], label [[LOOP:%.*]], label [[END:%.*]]
430 ; CHECK-NEXT: [[IV:%.*]] = phi i64 [ 0, [[IFEND]] ], [ [[IV_NEXT:%.*]], [[LOOPEND:%.*]] ]
431 ; CHECK-NEXT: [[PHI2_TC:%.*]] = phi float [ [[PHI1_TC]], [[IFEND]] ], [ [[PHI3_TC:%.*]], [[LOOPEND]] ]
432 ; CHECK-NEXT: [[TMP0:%.*]] = icmp eq i64 [[N]], 1
433 ; CHECK-NEXT: br i1 [[TMP0]], label [[LOOPTHEN:%.*]], label [[LOOPEND]]
435 ; CHECK-NEXT: [[LL:%.*]] = load i32, ptr [[D]], align 4
436 ; CHECK-NEXT: [[LL_BC:%.*]] = bitcast i32 [[LL]] to float
437 ; CHECK-NEXT: br label [[LOOPEND]]
439 ; CHECK-NEXT: [[PHI3_TC]] = phi float [ [[LL_BC]], [[LOOPTHEN]] ], [ [[PHI2_TC]], [[LOOP]] ]
440 ; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i64 [[IV]], 1
441 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[IV_NEXT]], [[N]]
442 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[END]], label [[LOOP]]
444 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[PHI1_TC]], [[IFEND]] ], [ [[PHI3_TC]], [[LOOPEND]] ]
445 ; CHECK-NEXT: ret float [[PHI_TC]]
448 %cmp = icmp eq i64 %n, 1
449 %ls = load i32, ptr %s, align 4
450 br i1 %cmp, label %then, label %ifend
453 %ld = load i32, ptr %d, align 4
457 %phi1 = phi i32 [ %ld, %then ], [ %ls, %entry ]
458 %cmp15 = icmp sgt i64 %n, 0
459 br i1 %cmp15, label %loop, label %end
462 %iv = phi i64 [ 0, %ifend ], [ %iv.next, %loopend ]
463 %phi2 = phi i32 [ %phi1, %ifend ], [ %phi3, %loopend ]
464 br i1 %cmp, label %loopthen, label %loopend
467 %ll = load i32, ptr %d, align 4
471 %phi3 = phi i32 [ %ll, %loopthen ], [ %phi2, %loop ]
472 %iv.next = add nuw nsw i64 %iv, 1
473 %exitcond = icmp eq i64 %iv.next, %n
474 br i1 %exitcond, label %end, label %loop
477 %phi = phi i32 [ %phi1, %ifend ], [ %phi3, %loopend ]
478 %b = bitcast i32 %phi to float
482 define void @convphi_stop(ptr %s, ptr %d, ptr %e, i32 %n) {
483 ; CHECK-LABEL: @convphi_stop(
485 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
486 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
488 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
489 ; CHECK-NEXT: br label [[END:%.*]]
491 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
492 ; CHECK-NEXT: br label [[END]]
494 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ]
495 ; CHECK-NEXT: [[B:%.*]] = bitcast i32 [[PHI]] to float
496 ; CHECK-NEXT: store float [[B]], ptr [[E:%.*]], align 4
497 ; CHECK-NEXT: ret void
500 %cmp15 = icmp sgt i32 %n, 0
501 br i1 %cmp15, label %then, label %else
504 %ls = load i32, ptr %s, align 4
508 %ld = load i32, ptr %d, align 4
512 %phi = phi i32 [ %ls, %then ], [ %ld, %else ]
513 %b = bitcast i32 %phi to float
514 store float %b, ptr %e, align 4
518 define void @convphi_stop2(ptr %s, ptr %d, ptr %e, i32 %n) {
519 ; CHECK-LABEL: @convphi_stop2(
521 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
522 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
524 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
525 ; CHECK-NEXT: [[LSB:%.*]] = bitcast i32 [[LS]] to float
526 ; CHECK-NEXT: br label [[END:%.*]]
528 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
529 ; CHECK-NEXT: [[LDB:%.*]] = bitcast i32 [[LD]] to float
530 ; CHECK-NEXT: br label [[END]]
532 ; CHECK-NEXT: [[PHI:%.*]] = phi float [ [[LSB]], [[THEN]] ], [ [[LDB]], [[ELSE]] ]
533 ; CHECK-NEXT: store float [[PHI]], ptr [[E:%.*]], align 4
534 ; CHECK-NEXT: ret void
537 %cmp15 = icmp sgt i32 %n, 0
538 br i1 %cmp15, label %then, label %else
541 %ls = load i32, ptr %s, align 4
542 %lsb = bitcast i32 %ls to float
546 %ld = load i32, ptr %d, align 4
547 %ldb = bitcast i32 %ld to float
551 %phi = phi float [ %lsb, %then ], [ %ldb, %else ]
552 store float %phi, ptr %e, align 4
556 define float @convphi_stop3(ptr %s, ptr %d, ptr %e, i32 %n) {
557 ; CHECK-LABEL: @convphi_stop3(
559 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
560 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
562 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
563 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
564 ; CHECK-NEXT: br label [[END:%.*]]
566 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
567 ; CHECK-NEXT: [[LD_BC:%.*]] = bitcast i32 [[LD]] to float
568 ; CHECK-NEXT: br label [[END]]
570 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[LS_BC]], [[THEN]] ], [ [[LD_BC]], [[ELSE]] ]
571 ; CHECK-NEXT: store float [[PHI_TC]], ptr [[E:%.*]], align 4
572 ; CHECK-NEXT: ret float [[PHI_TC]]
575 %cmp15 = icmp sgt i32 %n, 0
576 br i1 %cmp15, label %then, label %else
579 %ls = load i32, ptr %s, align 4
583 %ld = load i32, ptr %d, align 4
587 %phi = phi i32 [ %ls, %then ], [ %ld, %else ]
588 %b = bitcast i32 %phi to float
589 store float %b, ptr %e, align 4
593 define void @convphi_stop4(ptr %s, ptr %d, ptr %e, i32 %n) {
594 ; CHECK-LABEL: @convphi_stop4(
596 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
597 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
598 ; CHECK-NEXT: [[LD_BC:%.*]] = bitcast i32 [[LD]] to float
599 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
601 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
602 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
603 ; CHECK-NEXT: br label [[END]]
605 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[LS_BC]], [[THEN]] ], [ [[LD_BC]], [[ENTRY:%.*]] ]
606 ; CHECK-NEXT: [[TMP0:%.*]] = icmp sgt i32 [[N]], 0
607 ; CHECK-NEXT: [[BC:%.*]] = bitcast float [[PHI_TC]] to i32
608 ; CHECK-NEXT: store i32 [[BC]], ptr [[S]], align 4
609 ; CHECK-NEXT: br i1 [[TMP0]], label [[THEN2:%.*]], label [[END2:%.*]]
611 ; CHECK-NEXT: [[LF:%.*]] = load float, ptr [[E:%.*]], align 4
612 ; CHECK-NEXT: br label [[END2]]
614 ; CHECK-NEXT: [[PHI2:%.*]] = phi float [ [[PHI_TC]], [[END]] ], [ [[LF]], [[THEN2]] ]
615 ; CHECK-NEXT: store float [[PHI2]], ptr [[E]], align 4
616 ; CHECK-NEXT: ret void
619 %cmp15 = icmp sgt i32 %n, 0
620 %ld = load i32, ptr %d, align 4
621 br i1 %cmp15, label %then, label %end
624 %ls = load i32, ptr %s, align 4
628 %phi = phi i32 [ %ls, %then ], [ %ld, %entry ]
629 %phib = bitcast i32 %phi to float
630 store i32 %phi, ptr %s, align 4
631 br i1 %cmp15, label %then2, label %end2
634 %lf = load float, ptr %e, align 4
638 %phi2 = phi float [ %phib, %end ], [ %lf, %then2 ]
639 store float %phi2, ptr %e, align 4
643 define float @multiuse(ptr %s, ptr %d, i32 %n) {
644 ; CHECK-LABEL: @multiuse(
646 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
647 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
649 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
650 ; CHECK-NEXT: [[A:%.*]] = add i32 [[LS]], 2
651 ; CHECK-NEXT: store i32 [[A]], ptr [[D:%.*]], align 4
652 ; CHECK-NEXT: br label [[END:%.*]]
654 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D]], align 4
655 ; CHECK-NEXT: br label [[END]]
657 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ]
658 ; CHECK-NEXT: [[B:%.*]] = bitcast i32 [[PHI]] to float
659 ; CHECK-NEXT: ret float [[B]]
662 %cmp15 = icmp sgt i32 %n, 0
663 br i1 %cmp15, label %then, label %else
666 %ls = load i32, ptr %s, align 4
668 store i32 %a, ptr %d, align 4
672 %ld = load i32, ptr %d, align 4
676 %phi = phi i32 [ %ls, %then ], [ %ld, %else ]
677 %b = bitcast i32 %phi to float
681 define float @convphi_volatile(ptr %s, ptr %d, i32 %n) {
682 ; CHECK-LABEL: @convphi_volatile(
684 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
685 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
687 ; CHECK-NEXT: [[LS:%.*]] = load volatile i32, ptr [[S:%.*]], align 4
688 ; CHECK-NEXT: br label [[END:%.*]]
690 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
691 ; CHECK-NEXT: br label [[END]]
693 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ]
694 ; CHECK-NEXT: [[B:%.*]] = bitcast i32 [[PHI]] to float
695 ; CHECK-NEXT: ret float [[B]]
697 ; DEBUG-LABEL: @convphi_volatile(
699 ; DEBUG-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0, !dbg !358
700 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i1 [[CMP15]], metadata !353, metadata !DIExpression()), !dbg !358
701 ; DEBUG-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]], !dbg !359
703 ; DEBUG-NEXT: [[LS:%.*]] = load volatile i32, ptr [[S:%.*]], align 4, !dbg !360
704 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[LS]], metadata !354, metadata !DIExpression()), !dbg !360
705 ; DEBUG-NEXT: br label [[END:%.*]], !dbg !361
707 ; DEBUG-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4, !dbg !362
708 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[LD]], metadata !355, metadata !DIExpression()), !dbg !362
709 ; DEBUG-NEXT: br label [[END]], !dbg !363
711 ; DEBUG-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ], !dbg !364
712 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[PHI]], metadata !356, metadata !DIExpression()), !dbg !364
713 ; DEBUG-NEXT: [[B:%.*]] = bitcast i32 [[PHI]] to float, !dbg !365
714 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata float [[B]], metadata !357, metadata !DIExpression()), !dbg !365
715 ; DEBUG-NEXT: ret float [[B]], !dbg !366
717 %cmp15 = icmp sgt i32 %n, 0
718 br i1 %cmp15, label %then, label %else
721 %ls = load volatile i32, ptr %s, align 4
725 %ld = load i32, ptr %d, align 4
729 %phi = phi i32 [ %ls, %then ], [ %ld, %else ]
730 %b = bitcast i32 %phi to float
734 define void @convphi_volatile2(ptr %s, ptr %d, i32 %n, float %f) {
735 ; CHECK-LABEL: @convphi_volatile2(
737 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
738 ; CHECK-NEXT: [[FB:%.*]] = bitcast float [[F:%.*]] to i32
739 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
741 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
742 ; CHECK-NEXT: br label [[END]]
744 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[FB]], [[ENTRY:%.*]] ]
745 ; CHECK-NEXT: store volatile i32 [[PHI]], ptr [[D:%.*]], align 4
746 ; CHECK-NEXT: ret void
748 ; DEBUG-LABEL: @convphi_volatile2(
750 ; DEBUG-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0, !dbg !373
751 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i1 [[CMP15]], metadata !369, metadata !DIExpression()), !dbg !373
752 ; DEBUG-NEXT: [[FB:%.*]] = bitcast float [[F:%.*]] to i32, !dbg !374
753 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[FB]], metadata !370, metadata !DIExpression()), !dbg !374
754 ; DEBUG-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]], !dbg !375
756 ; DEBUG-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4, !dbg !376
757 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[LS]], metadata !371, metadata !DIExpression()), !dbg !376
758 ; DEBUG-NEXT: br label [[END]], !dbg !377
760 ; DEBUG-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[FB]], [[ENTRY:%.*]] ], !dbg !378
761 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[PHI]], metadata !372, metadata !DIExpression()), !dbg !378
762 ; DEBUG-NEXT: store volatile i32 [[PHI]], ptr [[D:%.*]], align 4, !dbg !379
763 ; DEBUG-NEXT: ret void, !dbg !380
765 %cmp15 = icmp sgt i32 %n, 0
766 %fb = bitcast float %f to i32
767 br i1 %cmp15, label %then, label %end
770 %ls = load i32, ptr %s, align 4
774 %phi = phi i32 [ %ls, %then ], [ %fb, %entry ]
775 store volatile i32 %phi, ptr %d
779 define float @convphi_atomic(ptr %s, ptr %d, i32 %n) {
780 ; CHECK-LABEL: @convphi_atomic(
782 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
783 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]]
785 ; CHECK-NEXT: [[LS:%.*]] = load atomic i32, ptr [[S:%.*]] acquire, align 4
786 ; CHECK-NEXT: br label [[END:%.*]]
788 ; CHECK-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4
789 ; CHECK-NEXT: br label [[END]]
791 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ]
792 ; CHECK-NEXT: [[B:%.*]] = bitcast i32 [[PHI]] to float
793 ; CHECK-NEXT: ret float [[B]]
795 ; DEBUG-LABEL: @convphi_atomic(
797 ; DEBUG-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0, !dbg !388
798 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i1 [[CMP15]], metadata !383, metadata !DIExpression()), !dbg !388
799 ; DEBUG-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[ELSE:%.*]], !dbg !389
801 ; DEBUG-NEXT: [[LS:%.*]] = load atomic i32, ptr [[S:%.*]] acquire, align 4, !dbg !390
802 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[LS]], metadata !384, metadata !DIExpression()), !dbg !390
803 ; DEBUG-NEXT: br label [[END:%.*]], !dbg !391
805 ; DEBUG-NEXT: [[LD:%.*]] = load i32, ptr [[D:%.*]], align 4, !dbg !392
806 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[LD]], metadata !385, metadata !DIExpression()), !dbg !392
807 ; DEBUG-NEXT: br label [[END]], !dbg !393
809 ; DEBUG-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[LD]], [[ELSE]] ], !dbg !394
810 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[PHI]], metadata !386, metadata !DIExpression()), !dbg !394
811 ; DEBUG-NEXT: [[B:%.*]] = bitcast i32 [[PHI]] to float, !dbg !395
812 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata float [[B]], metadata !387, metadata !DIExpression()), !dbg !395
813 ; DEBUG-NEXT: ret float [[B]], !dbg !396
815 %cmp15 = icmp sgt i32 %n, 0
816 br i1 %cmp15, label %then, label %else
819 %ls = load atomic i32, ptr %s acquire, align 4
823 %ld = load i32, ptr %d, align 4
827 %phi = phi i32 [ %ls, %then ], [ %ld, %else ]
828 %b = bitcast i32 %phi to float
832 define void @convphi_atomic2(ptr %s, ptr %d, i32 %n, float %f) {
833 ; CHECK-LABEL: @convphi_atomic2(
835 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
836 ; CHECK-NEXT: [[FB:%.*]] = bitcast float [[F:%.*]] to i32
837 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
839 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
840 ; CHECK-NEXT: br label [[END]]
842 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[FB]], [[ENTRY:%.*]] ]
843 ; CHECK-NEXT: store atomic i32 [[PHI]], ptr [[D:%.*]] release, align 4
844 ; CHECK-NEXT: ret void
846 ; DEBUG-LABEL: @convphi_atomic2(
848 ; DEBUG-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0, !dbg !403
849 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i1 [[CMP15]], metadata !399, metadata !DIExpression()), !dbg !403
850 ; DEBUG-NEXT: [[FB:%.*]] = bitcast float [[F:%.*]] to i32, !dbg !404
851 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[FB]], metadata !400, metadata !DIExpression()), !dbg !404
852 ; DEBUG-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]], !dbg !405
854 ; DEBUG-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4, !dbg !406
855 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[LS]], metadata !401, metadata !DIExpression()), !dbg !406
856 ; DEBUG-NEXT: br label [[END]], !dbg !407
858 ; DEBUG-NEXT: [[PHI:%.*]] = phi i32 [ [[LS]], [[THEN]] ], [ [[FB]], [[ENTRY:%.*]] ], !dbg !408
859 ; DEBUG-NEXT: call void @llvm.dbg.value(metadata i32 [[PHI]], metadata !402, metadata !DIExpression()), !dbg !408
860 ; DEBUG-NEXT: store atomic i32 [[PHI]], ptr [[D:%.*]] release, align 4, !dbg !409
861 ; DEBUG-NEXT: ret void, !dbg !410
863 %cmp15 = icmp sgt i32 %n, 0
864 %fb = bitcast float %f to i32
865 br i1 %cmp15, label %then, label %end
868 %ls = load i32, ptr %s, align 4
872 %phi = phi i32 [ %ls, %then ], [ %fb, %entry ]
873 store atomic i32 %phi, ptr %d release, align 4
877 define float @convphi2_zero(ptr %s, ptr %d, i32 %n) {
878 ; CHECK-LABEL: @convphi2_zero(
880 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
881 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
883 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
884 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
885 ; CHECK-NEXT: br label [[END]]
887 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[LS_BC]], [[THEN]] ], [ 0.000000e+00, [[ENTRY:%.*]] ]
888 ; CHECK-NEXT: ret float [[PHI_TC]]
891 %cmp15 = icmp sgt i32 %n, 0
892 br i1 %cmp15, label %then, label %end
895 %ls = load i32, ptr %s, align 4
899 %phi = phi i32 [ %ls, %then ], [ 0, %entry ]
900 %b = bitcast i32 %phi to float
904 define i32 @convphi2f_zero(ptr %s, ptr %d, i32 %n) {
905 ; CHECK-LABEL: @convphi2f_zero(
907 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
908 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
910 ; CHECK-NEXT: [[LS:%.*]] = load float, ptr [[S:%.*]], align 4
911 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast float [[LS]] to i32
912 ; CHECK-NEXT: br label [[END]]
914 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi i32 [ [[LS_BC]], [[THEN]] ], [ 0, [[ENTRY:%.*]] ]
915 ; CHECK-NEXT: ret i32 [[PHI_TC]]
918 %cmp15 = icmp sgt i32 %n, 0
919 br i1 %cmp15, label %then, label %end
922 %ls = load float, ptr %s, align 4
926 %phi = phi float [ %ls, %then ], [ 0.0, %entry ]
927 %b = bitcast float %phi to i32
931 define float @convphi2_ten(ptr %s, ptr %d, i32 %n) {
932 ; CHECK-LABEL: @convphi2_ten(
934 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
935 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
937 ; CHECK-NEXT: [[LS:%.*]] = load i32, ptr [[S:%.*]], align 4
938 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast i32 [[LS]] to float
939 ; CHECK-NEXT: br label [[END]]
941 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi float [ [[LS_BC]], [[THEN]] ], [ 0x36D4000000000000, [[ENTRY:%.*]] ]
942 ; CHECK-NEXT: ret float [[PHI_TC]]
945 %cmp15 = icmp sgt i32 %n, 0
946 br i1 %cmp15, label %then, label %end
949 %ls = load i32, ptr %s, align 4
953 %phi = phi i32 [ %ls, %then ], [ 10, %entry ]
954 %b = bitcast i32 %phi to float
958 define i32 @convphi2f_ten(ptr %s, ptr %d, i32 %n) {
959 ; CHECK-LABEL: @convphi2f_ten(
961 ; CHECK-NEXT: [[CMP15:%.*]] = icmp sgt i32 [[N:%.*]], 0
962 ; CHECK-NEXT: br i1 [[CMP15]], label [[THEN:%.*]], label [[END:%.*]]
964 ; CHECK-NEXT: [[LS:%.*]] = load float, ptr [[S:%.*]], align 4
965 ; CHECK-NEXT: [[LS_BC:%.*]] = bitcast float [[LS]] to i32
966 ; CHECK-NEXT: br label [[END]]
968 ; CHECK-NEXT: [[PHI_TC:%.*]] = phi i32 [ [[LS_BC]], [[THEN]] ], [ 1092616192, [[ENTRY:%.*]] ]
969 ; CHECK-NEXT: ret i32 [[PHI_TC]]
972 %cmp15 = icmp sgt i32 %n, 0
973 br i1 %cmp15, label %then, label %end
976 %ls = load float, ptr %s, align 4
980 %phi = phi float [ %ls, %then ], [ 10.0, %entry ]
981 %b = bitcast float %phi to i32