1 # RUN: llc -march=x86-64 -run-pass none -o - %s | FileCheck %s
2 # This test ensures that the MIR parser parses basic block successors correctly.
6 define i32 @foo(i32 %a) {
8 %0 = icmp sle i32 %a, 10
9 br i1 %0, label %less, label %exit
18 define i32 @bar(i32 %a) {
20 %b = icmp sle i32 %a, 10
21 br i1 %b, label %0, label %1
34 ; CHECK-LABEL: bb.0.entry:
35 ; CHECK-LABEL: bb.1.less:
37 successors: %bb.1.less, %bb.2.exit
40 CMP32ri8 $edi, 10, implicit-def $eflags
41 JCC_1 %bb.2.exit, 15, implicit killed $eflags
44 $eax = MOV32r0 implicit-def dead $eflags
50 $eax = COPY killed $edi
56 ; CHECK-LABEL: name: bar
57 ; Verify that we can have multiple lists of successors that will be merged
59 ; CHECK-LABEL: bb.0.entry:
60 ; CHECK: successors: %bb.1(0x80000000), %bb.2(0x00000000)
66 CMP32ri8 $edi, 10, implicit-def $eflags
67 JCC_1 %bb.2, 15, implicit killed $eflags
69 ; Verify that we can have an empty list of successors.
71 ; CHECK-NEXT: $eax = MOV32r0 implicit-def dead $eflags
74 $eax = MOV32r0 implicit-def dead $eflags
80 $eax = COPY killed $edi