MIR Serialization: Serialize immediate machine operands.
[oota-llvm.git] / test / CodeGen / MIR / X86 / immediate-operands.mir
1 # RUN: llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s | FileCheck %s
2 # This test ensures that the MIR parser parses immediate machine operands.
3
4 --- |
5
6   define i32 @foo() {
7   entry:
8     ret i32 42
9   }
10
11   define i32 @bar() {
12   entry:
13     ret i32 -11
14   }
15
16 ...
17 ---
18 # CHECK: name: foo
19 name:            foo
20 body:
21  - name:         entry
22    instructions:
23      # CHECK:      - '%eax = MOV32ri 42'
24      # CHECK-NEXT: - 'RETQ %eax'
25      - '%eax = MOV32ri 42'
26      - 'RETQ %eax'
27 ...
28 ---
29 # CHECK: name: bar
30 name:            bar
31 body:
32  - name:         entry
33    instructions:
34      # CHECK:      - '%eax = MOV32ri -11'
35      # CHECK-NEXT: - 'RETQ %eax'
36      - '%eax = MOV32ri -11'
37      - 'RETQ %eax'
38 ...