1# RUN: llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s | FileCheck %s
2# This test ensures that the MIR parser parses basic block successors and
3# probabilities correctly.
4
5--- |
6
7  define i32 @foo(i32 %a) {
8  entry:
9    %0 = icmp sle i32 %a, 10
10    br i1 %0, label %less, label %exit
11
12  less:
13    ret i32 0
14
15  exit:
16    ret i32 %a
17  }
18
19...
20---
21name:            foo
22body: |
23  ; CHECK-LABEL: bb.0.entry:
24  ; CHECK:         successors: %bb.1.less({{[0-9a-fx/= ]+}}33.00%), %bb.2.exit({{[0-9a-fx/= ]+}}67.00%)
25  ; CHECK-LABEL: bb.1.less:
26  bb.0.entry:
27    successors: %bb.1.less (33), %bb.2.exit(67)
28    liveins: %edi
29
30    CMP32ri8 %edi, 10, implicit-def %eflags
31    JG_1 %bb.2.exit, implicit killed %eflags
32
33  bb.1.less:
34    %eax = MOV32r0 implicit-def dead %eflags
35    RETQ killed %eax
36
37  bb.2.exit:
38    liveins: %edi
39
40    %eax = COPY killed %edi
41    RETQ killed %eax
42...
43