MIR Serialization: Serialize the virtual register operands.
[oota-llvm.git] / test / CodeGen / MIR / X86 / undefined-virtual-register.mir
1 # RUN: not llc -march=x86-64 -start-after machine-sink -stop-after machine-sink -o /dev/null %s 2>&1 | FileCheck %s
2 # This test ensures that the MIR parser reports an error when parsing a
3 # reference to an undefined virtual register.
4
5 --- |
6
7   define i32 @test(i32 %a) {
8   entry:
9     ret i32 %a
10   }
11
12 ...
13 ---
14 name:            test
15 isSSA:           true
16 tracksRegLiveness: true
17 registers:
18   - { id: 0, class: gr32 }
19 body:
20   - id:          0
21     name:        entry
22     instructions:
23       - '%0 = COPY %edi'
24       # CHECK: [[@LINE+1]]:22: use of undefined virtual register '%10'
25       - '%eax = COPY %10'
26       - 'RETQ %eax'
27 ...
28