MIR Serialization: Serialize the virtual register definitions.
[oota-llvm.git] / test / CodeGen / MIR / X86 / virtual-registers.mir
1 # RUN: llc -march=x86-64 -start-after machine-sink -stop-after machine-sink -o /dev/null %s | FileCheck %s
2 # This test ensures that the MIR parser parses virtual register definitions
3 # correctly.
4
5 --- |
6
7   define i32 @bar(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 ---
21 name:            bar
22 isSSA:           true
23 tracksRegLiveness: true
24 # CHECK:      registers:
25 # CHECK-NEXT:   - { id: 0, class: gr32 }
26 # CHECK-NEXT:   - { id: 1, class: gr32 }
27 # CHECK-NEXT:   - { id: 2, class: gr32 }
28 registers:
29   - { id: 0, class: gr32 }
30   - { id: 1, class: gr32 }
31   - { id: 2, class: gr32 }
32 body:
33   - id: 0
34 ...
35