1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
3 ; RUN: llc -mtriple=aarch64-linux-gnu %s -o - -verify-machineinstrs \
4 ; RUN: -start-before=aarch64-isel -stop-after=finalize-isel \
5 ; RUN: -global-isel=0 -fast-isel=0 | FileCheck %s
7 ; This file was initially generated via:
8 ; $ opt -S -callbrprepare llvm/test/CodeGen/AArch64/callbr-prepare.ll -o \
9 ; llvm/test/CodeGen/AArch64/callbr-asm-outputs-indirect-isel.ll
11 ; TODO: should we remove test cases that don't use landingpad intrinsic?
12 ; They're not interesting IMO.
14 ; Removed is the test case for x86 machine specific physreg constraints.
17 ; CHECK-LABEL: name: test0
19 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)
21 ; CHECK-NEXT: INLINEASM_BR &"# $0", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %5, 13 /* imm */, %bb.1
22 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %5
25 ; CHECK-NEXT: bb.1.entry.indirect_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
26 ; CHECK-NEXT: successors: %bb.5(0x80000000)
28 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %5
31 ; CHECK-NEXT: bb.2.direct:
32 ; CHECK-NEXT: successors: %bb.4(0x80000000), %bb.3(0x00000000)
34 ; CHECK-NEXT: INLINEASM_BR &"# $0", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %7, 13 /* imm */, %bb.3
35 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY %7
38 ; CHECK-NEXT: bb.3.direct.indirect_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
39 ; CHECK-NEXT: successors: %bb.5(0x80000000)
41 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr32all = COPY %7
44 ; CHECK-NEXT: bb.4.direct2:
45 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gpr32all = COPY $wzr
46 ; CHECK-NEXT: $w0 = COPY [[COPY4]]
47 ; CHECK-NEXT: RET_ReallyLR implicit $w0
49 ; CHECK-NEXT: bb.5.indirect:
50 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY1]], %bb.1, [[COPY3]], %bb.3
51 ; CHECK-NEXT: $w0 = COPY [[PHI]]
52 ; CHECK-NEXT: RET_ReallyLR implicit $w0
54 %out = callbr i32 asm "# $0", "=r,!i"()
55 to label %direct [label %entry.indirect_crit_edge]
57 entry.indirect_crit_edge: ; preds = %entry
58 %0 = call i32 @llvm.callbr.landingpad.i32(i32 %out)
61 direct: ; preds = %entry
62 %out2 = callbr i32 asm "# $0", "=r,!i"()
63 to label %direct2 [label %direct.indirect_crit_edge]
65 direct.indirect_crit_edge: ; preds = %direct
66 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %out2)
69 direct2: ; preds = %direct
72 indirect: ; preds = %direct.indirect_crit_edge, %entry.indirect_crit_edge
73 %out3 = phi i32 [ %0, %entry.indirect_crit_edge ], [ %1, %direct.indirect_crit_edge ]
77 define i32 @dont_split0() {
78 ; CHECK-LABEL: name: dont_split0
80 ; CHECK-NEXT: successors: %bb.1(0x80000000), %bb.2(0x00000000)
82 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 13 /* imm */, %bb.2
86 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 42
87 ; CHECK-NEXT: $w0 = COPY [[MOVi32imm]]
88 ; CHECK-NEXT: RET_ReallyLR implicit $w0
90 ; CHECK-NEXT: bb.2.y (machine-block-address-taken, inlineasm-br-indirect-target):
91 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY $wzr
92 ; CHECK-NEXT: $w0 = COPY [[COPY]]
93 ; CHECK-NEXT: RET_ReallyLR implicit $w0
95 callbr void asm "", "!i"()
96 to label %x [label %y]
105 define i32 @dont_split1() {
106 ; CHECK-LABEL: name: dont_split1
108 ; CHECK-NEXT: successors: %bb.1(0x80000000), %bb.2(0x00000000)
110 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %1, 13 /* imm */, %bb.2
111 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %1
112 ; CHECK-NEXT: B %bb.1
114 ; CHECK-NEXT: bb.1.x:
115 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 42
116 ; CHECK-NEXT: $w0 = COPY [[MOVi32imm]]
117 ; CHECK-NEXT: RET_ReallyLR implicit $w0
119 ; CHECK-NEXT: bb.2.y (machine-block-address-taken, inlineasm-br-indirect-target):
120 ; CHECK-NEXT: $w0 = COPY %1
121 ; CHECK-NEXT: RET_ReallyLR implicit $w0
123 %0 = callbr i32 asm "", "=r,!i"()
124 to label %x [label %y]
130 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
134 define i32 @dont_split2() {
135 ; CHECK-LABEL: name: dont_split2
137 ; CHECK-NEXT: successors: %bb.1(0x80000000), %bb.2(0x00000000)
139 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 42
140 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY [[MOVi32imm]]
141 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 13 /* imm */, %bb.2
142 ; CHECK-NEXT: B %bb.1
144 ; CHECK-NEXT: bb.1.x:
145 ; CHECK-NEXT: successors: %bb.2(0x80000000)
147 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY $wzr
148 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY [[COPY1]]
150 ; CHECK-NEXT: bb.2.y (machine-block-address-taken, inlineasm-br-indirect-target):
151 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.0, [[COPY2]], %bb.1
152 ; CHECK-NEXT: $w0 = COPY [[PHI]]
153 ; CHECK-NEXT: RET_ReallyLR implicit $w0
155 callbr void asm "", "!i"()
156 to label %x [label %y]
161 y: ; preds = %x, %entry
162 %0 = phi i32 [ 0, %x ], [ 42, %entry ]
166 define i32 @dont_split3() {
167 ; CHECK-LABEL: name: dont_split3
169 ; CHECK-NEXT: successors: %bb.1(0x80000000), %bb.2(0x00000000)
171 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %0, 13 /* imm */, %bb.2
172 ; CHECK-NEXT: B %bb.1
174 ; CHECK-NEXT: bb.1.x:
175 ; CHECK-NEXT: successors: %bb.2(0x80000000)
178 ; CHECK-NEXT: bb.2.v (machine-block-address-taken, inlineasm-br-indirect-target):
179 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 42
180 ; CHECK-NEXT: $w0 = COPY [[MOVi32imm]]
181 ; CHECK-NEXT: RET_ReallyLR implicit $w0
183 %0 = callbr i32 asm "", "=r,!i"()
184 to label %x [label %v]
189 v: ; preds = %x, %entry
193 define i32 @split_me0() {
194 ; CHECK-LABEL: name: split_me0
196 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)
198 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %3, 13 /* imm */, %bb.1
199 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %3
200 ; CHECK-NEXT: B %bb.2
202 ; CHECK-NEXT: bb.1.entry.y_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
203 ; CHECK-NEXT: successors: %bb.3(0x80000000)
205 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %3
206 ; CHECK-NEXT: B %bb.3
208 ; CHECK-NEXT: bb.2.x:
209 ; CHECK-NEXT: successors: %bb.3(0x80000000)
211 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 42
212 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY [[MOVi32imm]]
214 ; CHECK-NEXT: bb.3.y:
215 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY1]], %bb.1, [[COPY2]], %bb.2
216 ; CHECK-NEXT: $w0 = COPY [[PHI]]
217 ; CHECK-NEXT: RET_ReallyLR implicit $w0
219 %0 = callbr i32 asm "", "=r,!i"()
220 to label %x [label %entry.y_crit_edge]
222 entry.y_crit_edge: ; preds = %entry
223 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
229 y: ; preds = %entry.y_crit_edge, %x
230 %2 = phi i32 [ %1, %entry.y_crit_edge ], [ 42, %x ]
234 define i32 @split_me1(i1 %z) {
235 ; CHECK-LABEL: name: split_me1
237 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.4(0x40000000)
238 ; CHECK-NEXT: liveins: $w0
240 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
241 ; CHECK-NEXT: [[DEF:%[0-9]+]]:gpr32all = IMPLICIT_DEF
242 ; CHECK-NEXT: TBZW [[COPY]], 0, %bb.4
243 ; CHECK-NEXT: B %bb.1
245 ; CHECK-NEXT: bb.1.w:
246 ; CHECK-NEXT: successors: %bb.3(0x80000000), %bb.2(0x00000000)
248 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %5, 13 /* imm */, %bb.2, 13 /* imm */, %bb.2
249 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %5
250 ; CHECK-NEXT: B %bb.3
252 ; CHECK-NEXT: bb.2.w.v_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
253 ; CHECK-NEXT: successors: %bb.4(0x80000000)
255 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY %5
256 ; CHECK-NEXT: B %bb.4
258 ; CHECK-NEXT: bb.3.x:
259 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 42
260 ; CHECK-NEXT: $w0 = COPY [[MOVi32imm]]
261 ; CHECK-NEXT: RET_ReallyLR implicit $w0
263 ; CHECK-NEXT: bb.4.v:
264 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[DEF]], %bb.0, [[COPY2]], %bb.2
265 ; CHECK-NEXT: $w0 = COPY [[PHI]]
266 ; CHECK-NEXT: RET_ReallyLR implicit $w0
268 br i1 %z, label %w, label %v
271 %0 = callbr i32 asm "", "=r,!i,!i"()
272 to label %x [label %w.v_crit_edge, label %w.v_crit_edge]
274 w.v_crit_edge: ; preds = %w, %w
275 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
281 v: ; preds = %w.v_crit_edge, %entry
282 %2 = phi i32 [ %1, %w.v_crit_edge ], [ undef, %entry ]
286 define i32 @split_me2(i1 %z) {
287 ; CHECK-LABEL: name: split_me2
289 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.4(0x40000000)
290 ; CHECK-NEXT: liveins: $w0
292 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
293 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 42
294 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY [[MOVi32imm]]
295 ; CHECK-NEXT: TBZW [[COPY]], 0, %bb.4
296 ; CHECK-NEXT: B %bb.1
298 ; CHECK-NEXT: bb.1.w:
299 ; CHECK-NEXT: successors: %bb.3(0x80000000), %bb.2(0x00000000)
301 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %6, 13 /* imm */, %bb.2, 13 /* imm */, %bb.2
302 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY %6
303 ; CHECK-NEXT: B %bb.3
305 ; CHECK-NEXT: bb.2.w.v_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
306 ; CHECK-NEXT: successors: %bb.4(0x80000000)
308 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr32all = COPY %6
309 ; CHECK-NEXT: B %bb.4
311 ; CHECK-NEXT: bb.3.x:
312 ; CHECK-NEXT: [[MOVi32imm1:%[0-9]+]]:gpr32 = MOVi32imm 42
313 ; CHECK-NEXT: $w0 = COPY [[MOVi32imm1]]
314 ; CHECK-NEXT: RET_ReallyLR implicit $w0
316 ; CHECK-NEXT: bb.4.v:
317 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY1]], %bb.0, [[COPY3]], %bb.2
318 ; CHECK-NEXT: $w0 = COPY [[PHI]]
319 ; CHECK-NEXT: RET_ReallyLR implicit $w0
321 br i1 %z, label %w, label %v
324 %0 = callbr i32 asm "", "=r,!i,!i"()
325 to label %x [label %w.v_crit_edge, label %w.v_crit_edge]
327 w.v_crit_edge: ; preds = %w, %w
328 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
334 v: ; preds = %w.v_crit_edge, %entry
335 %2 = phi i32 [ %1, %w.v_crit_edge ], [ 42, %entry ]
339 define i32 @dont_split4() {
340 ; CHECK-LABEL: name: dont_split4
342 ; CHECK-NEXT: successors: %bb.1(0x80000000), %bb.2(0x00000000)
344 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %3, 13 /* imm */, %bb.2
345 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %3
346 ; CHECK-NEXT: B %bb.1
348 ; CHECK-NEXT: bb.1.x:
349 ; CHECK-NEXT: successors: %bb.3(0x80000000)
351 ; CHECK-NEXT: B %bb.3
353 ; CHECK-NEXT: bb.2.y (machine-block-address-taken, inlineasm-br-indirect-target):
354 ; CHECK-NEXT: successors: %bb.3(0x80000000)
356 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %3
358 ; CHECK-NEXT: bb.3.out:
359 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY1]], %bb.2, [[COPY]], %bb.1
360 ; CHECK-NEXT: $w0 = COPY [[PHI]]
361 ; CHECK-NEXT: RET_ReallyLR implicit $w0
363 %0 = callbr i32 asm "", "=r,!i"()
364 to label %x [label %y]
370 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
373 out: ; preds = %y, %x
374 %2 = phi i32 [ %1, %y ], [ %0, %x ]
378 define i32 @dont_split5() {
379 ; CHECK-LABEL: name: dont_split5
381 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)
383 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %3, 13 /* imm */, %bb.1
384 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %3
385 ; CHECK-NEXT: B %bb.2
387 ; CHECK-NEXT: bb.1.y (machine-block-address-taken, inlineasm-br-indirect-target):
388 ; CHECK-NEXT: successors: %bb.2(0x80000000)
390 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %3
392 ; CHECK-NEXT: bb.2.out:
393 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.0, [[COPY1]], %bb.1
394 ; CHECK-NEXT: $w0 = COPY [[PHI]]
395 ; CHECK-NEXT: RET_ReallyLR implicit $w0
397 %0 = callbr i32 asm "", "=r,!i"()
398 to label %out [label %y]
401 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
404 out: ; preds = %y, %entry
405 %2 = phi i32 [ %1, %y ], [ %0, %entry ]
409 define i32 @split_me3() {
410 ; CHECK-LABEL: name: split_me3
412 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)
414 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %3, 13 /* imm */, %bb.1
415 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %3
416 ; CHECK-NEXT: B %bb.2
418 ; CHECK-NEXT: bb.1.entry.out_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
419 ; CHECK-NEXT: successors: %bb.3(0x80000000)
421 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %3
422 ; CHECK-NEXT: B %bb.3
424 ; CHECK-NEXT: bb.2.y:
425 ; CHECK-NEXT: successors: %bb.3(0x80000000)
428 ; CHECK-NEXT: bb.3.out:
429 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY1]], %bb.1, [[COPY]], %bb.2
430 ; CHECK-NEXT: $w0 = COPY [[PHI]]
431 ; CHECK-NEXT: RET_ReallyLR implicit $w0
433 %0 = callbr i32 asm "", "=r,!i"()
434 to label %y [label %entry.out_crit_edge]
436 entry.out_crit_edge: ; preds = %entry
437 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
443 out: ; preds = %entry.out_crit_edge, %y
444 %2 = phi i32 [ %1, %entry.out_crit_edge ], [ %0, %y ]
448 define i32 @dont_split6(i32 %0) {
449 ; CHECK-LABEL: name: dont_split6
451 ; CHECK-NEXT: successors: %bb.1(0x80000000)
452 ; CHECK-NEXT: liveins: $w0
454 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
456 ; CHECK-NEXT: bb.1.loop:
457 ; CHECK-NEXT: successors: %bb.3(0x80000000), %bb.2(0x00000000)
459 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.0, %2, %bb.2
460 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32common = COPY [[PHI]]
461 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %4, 2147483657 /* reguse tiedto:$0 */, [[COPY1]](tied-def 3), 13 /* imm */, %bb.2
462 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY %4
463 ; CHECK-NEXT: B %bb.3
465 ; CHECK-NEXT: bb.2.loop.loop_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
466 ; CHECK-NEXT: successors: %bb.1(0x80000000)
468 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr32all = COPY %4
469 ; CHECK-NEXT: B %bb.1
471 ; CHECK-NEXT: bb.3.exit:
472 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gpr32all = COPY $wzr
473 ; CHECK-NEXT: $w0 = COPY [[COPY4]]
474 ; CHECK-NEXT: RET_ReallyLR implicit $w0
478 loop: ; preds = %loop.loop_crit_edge, %entry
479 %1 = phi i32 [ %0, %entry ], [ %3, %loop.loop_crit_edge ]
480 %2 = callbr i32 asm "", "=r,0,!i"(i32 %1)
481 to label %exit [label %loop.loop_crit_edge]
483 loop.loop_crit_edge: ; preds = %loop
484 %3 = call i32 @llvm.callbr.landingpad.i32(i32 %2)
487 exit: ; preds = %loop
491 define i32 @split_me4() {
492 ; CHECK-LABEL: name: split_me4
494 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)
496 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %3, 13 /* imm */, %bb.1
497 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %3
498 ; CHECK-NEXT: B %bb.2
500 ; CHECK-NEXT: bb.1.entry.same_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
501 ; CHECK-NEXT: successors: %bb.2(0x80000000)
503 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %3
505 ; CHECK-NEXT: bb.2.same:
506 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.0, [[COPY1]], %bb.1
507 ; CHECK-NEXT: $w0 = COPY [[PHI]]
508 ; CHECK-NEXT: RET_ReallyLR implicit $w0
510 %0 = callbr i32 asm "", "=r,!i"()
511 to label %same [label %entry.same_crit_edge]
513 entry.same_crit_edge: ; preds = %entry
514 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
517 same: ; preds = %entry.same_crit_edge, %entry
518 %2 = phi i32 [ %1, %entry.same_crit_edge ], [ %0, %entry ]
522 define i32 @split_me5() {
523 ; CHECK-LABEL: name: split_me5
525 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)
527 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, 1507338 /* regdef:GPR32common */, def %3, 13 /* imm */, %bb.1
528 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %3
529 ; CHECK-NEXT: B %bb.2
531 ; CHECK-NEXT: bb.1.entry.same_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
532 ; CHECK-NEXT: successors: %bb.2(0x80000000)
534 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %3
536 ; CHECK-NEXT: bb.2.same:
537 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.0, [[COPY1]], %bb.1
538 ; CHECK-NEXT: $w0 = COPY [[PHI]]
539 ; CHECK-NEXT: RET_ReallyLR implicit $w0
541 %0 = callbr i32 asm "", "=r,!i"()
542 to label %same [label %entry.same_crit_edge]
544 entry.same_crit_edge: ; preds = %entry
545 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
548 same: ; preds = %entry.same_crit_edge, %entry
549 %2 = phi i32 [ %1, %entry.same_crit_edge ], [ %0, %entry ]
553 ; Function Attrs: nounwind
554 declare i32 @llvm.callbr.landingpad.i32(i32) #0
556 ; Function Attrs: nounwind
557 declare i64 @llvm.callbr.landingpad.i64(i64) #0
559 attributes #0 = { nounwind }