MIR Serialization: Serialize the jump table info.
[oota-llvm.git] / test / CodeGen / MIR / X86 / undefined-global-value.mir
1 # RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
2 # This test ensures that an error is reported when an invalid global value index
3 # is used.
4
5 --- |
6
7   @0 = external global i32
8
9   define i32 @inc() {
10   entry:
11     %a = load i32, i32* @0
12     %b = add i32 %a, 1
13     ret i32 %b
14   }
15
16 ...
17 ---
18 name: inc
19 body:
20   - id: 0
21     name: entry
22     instructions:
23       # CHECK: [[@LINE+1]]:37: use of undefined global value '@2'
24       - '%rax = MOV64rm %rip, 1, _, @2, _'
25       - '%eax = MOV32rm %rax, 1, _, 0, _'
26       - '%eax = INC32r %eax'
27       - 'RETQ %eax'
28 ...