MIR Parser: Verify the implicit machine register operands.
[oota-llvm.git] / test / CodeGen / MIR / X86 / expected-different-implicit-operand.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   define i32 @foo(i32* %p) {
6   entry:
7     %a = load i32, i32* %p
8     %0 = icmp sle i32 %a, 10
9     br i1 %0, label %less, label %exit
10
11   less:
12     ret i32 0
13
14   exit:
15     ret i32 %a
16   }
17
18
19 ...
20 ---
21 name:            foo
22 body:
23  - id:              0
24    name:            entry
25    instructions:
26      - '%eax = MOV32rm %rdi, 1, _, 0, _'
27      - 'CMP32ri8 %eax, 10, implicit-def %eflags'
28 # CHECK: [[@LINE+1]]:26: expected an implicit register operand 'implicit %eflags'
29      - 'JG_1 %bb.2.exit, implicit %eax'
30  - id:              1
31    name:            less
32    instructions:
33      - '%eax = MOV32r0 implicit-def %eflags'
34  - id:              2
35    name:            exit
36    instructions:
37      - 'RETQ %eax'
38 ...