MIR Serialization: Serialize machine basic block operands.
[oota-llvm.git] / test / CodeGen / MIR / X86 / unknown-named-machine-basic-block.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 unknown named machine
3 # basic block is encountered.
4
5 --- |
6
7   define i32 @foo(i32* %p) {
8   entry:
9     %a = load i32, i32* %p
10     %0 = icmp sle i32 %a, 10
11     br i1 %0, label %less, label %exit
12
13   less:
14     ret i32 0
15
16   exit:
17     ret i32 %a
18   }
19
20 ...
21 ---
22 name:            foo
23 body:
24  - id:              0
25    name:            entry
26    instructions:
27      - '%eax = MOV32rm %rdi, 1, _, 0, _'
28      - 'CMP32ri8 %eax, 10'
29      # CHECK: [[@LINE+1]]:14: the name of machine basic block #2 isn't 'hit'
30      - 'JG_1 %bb.2.hit'
31  - id:              1
32    name:            less
33    instructions:
34      - '%eax = MOV32r0'
35  - id:              2
36    name:            exit
37    instructions:
38      - 'RETQ %eax'
39 ...