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 */, {{[0-9]+}} /* 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 */, {{[0-9]+}} /* 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 */, {{[0-9]+}} /* 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 */, {{[0-9]+}} /* 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)
177 ; CHECK-NEXT: bb.2.v (machine-block-address-taken, inlineasm-br-indirect-target):
178 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 42
179 ; CHECK-NEXT: $w0 = COPY [[MOVi32imm]]
180 ; CHECK-NEXT: RET_ReallyLR implicit $w0
182 %0 = callbr i32 asm "", "=r,!i"()
183 to label %x [label %v]
188 v: ; preds = %x, %entry
192 define i32 @split_me0() {
193 ; CHECK-LABEL: name: split_me0
195 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)
197 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, {{[0-9]+}} /* regdef:GPR32common */, def %3, 13 /* imm */, %bb.1
198 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %3
199 ; CHECK-NEXT: B %bb.2
201 ; CHECK-NEXT: bb.1.entry.y_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
202 ; CHECK-NEXT: successors: %bb.3(0x80000000)
204 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %3
205 ; CHECK-NEXT: B %bb.3
207 ; CHECK-NEXT: bb.2.x:
208 ; CHECK-NEXT: successors: %bb.3(0x80000000)
210 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 42
211 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY [[MOVi32imm]]
213 ; CHECK-NEXT: bb.3.y:
214 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY1]], %bb.1, [[COPY2]], %bb.2
215 ; CHECK-NEXT: $w0 = COPY [[PHI]]
216 ; CHECK-NEXT: RET_ReallyLR implicit $w0
218 %0 = callbr i32 asm "", "=r,!i"()
219 to label %x [label %entry.y_crit_edge]
221 entry.y_crit_edge: ; preds = %entry
222 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
228 y: ; preds = %entry.y_crit_edge, %x
229 %2 = phi i32 [ %1, %entry.y_crit_edge ], [ 42, %x ]
233 define i32 @split_me1(i1 %z) {
234 ; CHECK-LABEL: name: split_me1
236 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.4(0x40000000)
237 ; CHECK-NEXT: liveins: $w0
239 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
240 ; CHECK-NEXT: [[DEF:%[0-9]+]]:gpr32all = IMPLICIT_DEF
241 ; CHECK-NEXT: TBZW [[COPY]], 0, %bb.4
242 ; CHECK-NEXT: B %bb.1
244 ; CHECK-NEXT: bb.1.w:
245 ; CHECK-NEXT: successors: %bb.3(0x80000000), %bb.2(0x00000000)
247 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, {{[0-9]+}} /* regdef:GPR32common */, def %5, 13 /* imm */, %bb.2, 13 /* imm */, %bb.2
248 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %5
249 ; CHECK-NEXT: B %bb.3
251 ; CHECK-NEXT: bb.2.w.v_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
252 ; CHECK-NEXT: successors: %bb.4(0x80000000)
254 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY %5
255 ; CHECK-NEXT: B %bb.4
257 ; CHECK-NEXT: bb.3.x:
258 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 42
259 ; CHECK-NEXT: $w0 = COPY [[MOVi32imm]]
260 ; CHECK-NEXT: RET_ReallyLR implicit $w0
262 ; CHECK-NEXT: bb.4.v:
263 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[DEF]], %bb.0, [[COPY2]], %bb.2
264 ; CHECK-NEXT: $w0 = COPY [[PHI]]
265 ; CHECK-NEXT: RET_ReallyLR implicit $w0
267 br i1 %z, label %w, label %v
270 %0 = callbr i32 asm "", "=r,!i,!i"()
271 to label %x [label %w.v_crit_edge, label %w.v_crit_edge]
273 w.v_crit_edge: ; preds = %w, %w
274 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
280 v: ; preds = %w.v_crit_edge, %entry
281 %2 = phi i32 [ %1, %w.v_crit_edge ], [ undef, %entry ]
285 define i32 @split_me2(i1 %z) {
286 ; CHECK-LABEL: name: split_me2
288 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.4(0x40000000)
289 ; CHECK-NEXT: liveins: $w0
291 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
292 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 42
293 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY [[MOVi32imm]]
294 ; CHECK-NEXT: TBZW [[COPY]], 0, %bb.4
295 ; CHECK-NEXT: B %bb.1
297 ; CHECK-NEXT: bb.1.w:
298 ; CHECK-NEXT: successors: %bb.3(0x80000000), %bb.2(0x00000000)
300 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, {{[0-9]+}} /* regdef:GPR32common */, def %6, 13 /* imm */, %bb.2, 13 /* imm */, %bb.2
301 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY %6
302 ; CHECK-NEXT: B %bb.3
304 ; CHECK-NEXT: bb.2.w.v_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
305 ; CHECK-NEXT: successors: %bb.4(0x80000000)
307 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr32all = COPY %6
308 ; CHECK-NEXT: B %bb.4
310 ; CHECK-NEXT: bb.3.x:
311 ; CHECK-NEXT: [[MOVi32imm1:%[0-9]+]]:gpr32 = MOVi32imm 42
312 ; CHECK-NEXT: $w0 = COPY [[MOVi32imm1]]
313 ; CHECK-NEXT: RET_ReallyLR implicit $w0
315 ; CHECK-NEXT: bb.4.v:
316 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY1]], %bb.0, [[COPY3]], %bb.2
317 ; CHECK-NEXT: $w0 = COPY [[PHI]]
318 ; CHECK-NEXT: RET_ReallyLR implicit $w0
320 br i1 %z, label %w, label %v
323 %0 = callbr i32 asm "", "=r,!i,!i"()
324 to label %x [label %w.v_crit_edge, label %w.v_crit_edge]
326 w.v_crit_edge: ; preds = %w, %w
327 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
333 v: ; preds = %w.v_crit_edge, %entry
334 %2 = phi i32 [ %1, %w.v_crit_edge ], [ 42, %entry ]
338 define i32 @dont_split4() {
339 ; CHECK-LABEL: name: dont_split4
341 ; CHECK-NEXT: successors: %bb.1(0x80000000), %bb.2(0x00000000)
343 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, {{[0-9]+}} /* regdef:GPR32common */, def %3, 13 /* imm */, %bb.2
344 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %3
345 ; CHECK-NEXT: B %bb.1
347 ; CHECK-NEXT: bb.1.x:
348 ; CHECK-NEXT: successors: %bb.3(0x80000000)
350 ; CHECK-NEXT: B %bb.3
352 ; CHECK-NEXT: bb.2.y (machine-block-address-taken, inlineasm-br-indirect-target):
353 ; CHECK-NEXT: successors: %bb.3(0x80000000)
355 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %3
357 ; CHECK-NEXT: bb.3.out:
358 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY1]], %bb.2, [[COPY]], %bb.1
359 ; CHECK-NEXT: $w0 = COPY [[PHI]]
360 ; CHECK-NEXT: RET_ReallyLR implicit $w0
362 %0 = callbr i32 asm "", "=r,!i"()
363 to label %x [label %y]
369 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
372 out: ; preds = %y, %x
373 %2 = phi i32 [ %1, %y ], [ %0, %x ]
377 define i32 @dont_split5() {
378 ; CHECK-LABEL: name: dont_split5
380 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)
382 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, {{[0-9]+}} /* regdef:GPR32common */, def %3, 13 /* imm */, %bb.1
383 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %3
384 ; CHECK-NEXT: B %bb.2
386 ; CHECK-NEXT: bb.1.y (machine-block-address-taken, inlineasm-br-indirect-target):
387 ; CHECK-NEXT: successors: %bb.2(0x80000000)
389 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %3
391 ; CHECK-NEXT: bb.2.out:
392 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.0, [[COPY1]], %bb.1
393 ; CHECK-NEXT: $w0 = COPY [[PHI]]
394 ; CHECK-NEXT: RET_ReallyLR implicit $w0
396 %0 = callbr i32 asm "", "=r,!i"()
397 to label %out [label %y]
400 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
403 out: ; preds = %y, %entry
404 %2 = phi i32 [ %1, %y ], [ %0, %entry ]
408 define i32 @split_me3() {
409 ; CHECK-LABEL: name: split_me3
411 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)
413 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, {{[0-9]+}} /* regdef:GPR32common */, def %3, 13 /* imm */, %bb.1
414 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %3
415 ; CHECK-NEXT: B %bb.2
417 ; CHECK-NEXT: bb.1.entry.out_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
418 ; CHECK-NEXT: successors: %bb.3(0x80000000)
420 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %3
421 ; CHECK-NEXT: B %bb.3
423 ; CHECK-NEXT: bb.2.y:
424 ; CHECK-NEXT: successors: %bb.3(0x80000000)
426 ; CHECK-NEXT: bb.3.out:
427 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY1]], %bb.1, [[COPY]], %bb.2
428 ; CHECK-NEXT: $w0 = COPY [[PHI]]
429 ; CHECK-NEXT: RET_ReallyLR implicit $w0
431 %0 = callbr i32 asm "", "=r,!i"()
432 to label %y [label %entry.out_crit_edge]
434 entry.out_crit_edge: ; preds = %entry
435 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
441 out: ; preds = %entry.out_crit_edge, %y
442 %2 = phi i32 [ %1, %entry.out_crit_edge ], [ %0, %y ]
446 define i32 @dont_split6(i32 %0) {
447 ; CHECK-LABEL: name: dont_split6
449 ; CHECK-NEXT: successors: %bb.1(0x80000000)
450 ; CHECK-NEXT: liveins: $w0
452 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
454 ; CHECK-NEXT: bb.1.loop:
455 ; CHECK-NEXT: successors: %bb.3(0x80000000), %bb.2(0x00000000)
457 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.0, %2, %bb.2
458 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32common = COPY [[PHI]]
459 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, {{[0-9]+}} /* regdef:GPR32common */, def %4, 2147483657 /* reguse tiedto:$0 */, [[COPY1]](tied-def 3), 13 /* imm */, %bb.2
460 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY %4
461 ; CHECK-NEXT: B %bb.3
463 ; CHECK-NEXT: bb.2.loop.loop_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
464 ; CHECK-NEXT: successors: %bb.1(0x80000000)
466 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr32all = COPY %4
467 ; CHECK-NEXT: B %bb.1
469 ; CHECK-NEXT: bb.3.exit:
470 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gpr32all = COPY $wzr
471 ; CHECK-NEXT: $w0 = COPY [[COPY4]]
472 ; CHECK-NEXT: RET_ReallyLR implicit $w0
476 loop: ; preds = %loop.loop_crit_edge, %entry
477 %1 = phi i32 [ %0, %entry ], [ %3, %loop.loop_crit_edge ]
478 %2 = callbr i32 asm "", "=r,0,!i"(i32 %1)
479 to label %exit [label %loop.loop_crit_edge]
481 loop.loop_crit_edge: ; preds = %loop
482 %3 = call i32 @llvm.callbr.landingpad.i32(i32 %2)
485 exit: ; preds = %loop
489 define i32 @split_me4() {
490 ; CHECK-LABEL: name: split_me4
492 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)
494 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, {{[0-9]+}} /* regdef:GPR32common */, def %3, 13 /* imm */, %bb.1
495 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %3
496 ; CHECK-NEXT: B %bb.2
498 ; CHECK-NEXT: bb.1.entry.same_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
499 ; CHECK-NEXT: successors: %bb.2(0x80000000)
501 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %3
503 ; CHECK-NEXT: bb.2.same:
504 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.0, [[COPY1]], %bb.1
505 ; CHECK-NEXT: $w0 = COPY [[PHI]]
506 ; CHECK-NEXT: RET_ReallyLR implicit $w0
508 %0 = callbr i32 asm "", "=r,!i"()
509 to label %same [label %entry.same_crit_edge]
511 entry.same_crit_edge: ; preds = %entry
512 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
515 same: ; preds = %entry.same_crit_edge, %entry
516 %2 = phi i32 [ %1, %entry.same_crit_edge ], [ %0, %entry ]
520 define i32 @split_me5() {
521 ; CHECK-LABEL: name: split_me5
523 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)
525 ; CHECK-NEXT: INLINEASM_BR &"", 0 /* attdialect */, {{[0-9]+}} /* regdef:GPR32common */, def %3, 13 /* imm */, %bb.1
526 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %3
527 ; CHECK-NEXT: B %bb.2
529 ; CHECK-NEXT: bb.1.entry.same_crit_edge (machine-block-address-taken, inlineasm-br-indirect-target):
530 ; CHECK-NEXT: successors: %bb.2(0x80000000)
532 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY %3
534 ; CHECK-NEXT: bb.2.same:
535 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.0, [[COPY1]], %bb.1
536 ; CHECK-NEXT: $w0 = COPY [[PHI]]
537 ; CHECK-NEXT: RET_ReallyLR implicit $w0
539 %0 = callbr i32 asm "", "=r,!i"()
540 to label %same [label %entry.same_crit_edge]
542 entry.same_crit_edge: ; preds = %entry
543 %1 = call i32 @llvm.callbr.landingpad.i32(i32 %0)
546 same: ; preds = %entry.same_crit_edge, %entry
547 %2 = phi i32 [ %1, %entry.same_crit_edge ], [ %0, %entry ]
551 ; Function Attrs: nounwind
552 declare i32 @llvm.callbr.landingpad.i32(i32) #0
554 ; Function Attrs: nounwind
555 declare i64 @llvm.callbr.landingpad.i64(i64) #0
557 attributes #0 = { nounwind }