MIR Serialization: Serialize the block address machine operands.
[oota-llvm.git] / test / CodeGen / MIR / X86 / expected-global-value-after-blockaddress.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
3 --- |
4
5   @addr = global i8* null
6
7   define void @test() {
8   entry:
9     store volatile i8* blockaddress(@test, %block), i8** @addr
10     %val = load volatile i8*, i8** @addr
11     indirectbr i8* %val, [label %block]
12
13   block:
14     ret void
15   }
16
17 ...
18 ---
19 name:            test
20 body:
21   - id:              0
22     name:            entry
23     successors:      [ '%bb.1.block' ]
24     instructions:
25       # CHECK: [[@LINE+1]]:49: expected a global value
26       - '%rax = LEA64r %rip, 1, _, blockaddress(0, %ir-block.block), _'
27       - 'MOV64mr %rip, 1, _, @addr, _, killed %rax'
28       - 'JMP64m %rip, 1, _, @addr, _'
29   - id:              1
30     name:            block
31     addressTaken:    true
32     instructions:
33       - RETQ
34 ...