MIR Serialization: Serialize the liveout register mask machine operands.
[oota-llvm.git] / test / CodeGen / MIR / X86 / liveout-register-mask.mir
1 # RUN: llc -march=x86-64 -start-after stackmap-liveness -stop-after stackmap-liveness -o /dev/null %s | FileCheck %s
2 # This test ensures that the MIR parser parses the liveout register mask
3 # machine operands correctly.
4
5 --- |
6
7   define void @small_patchpoint_codegen(i64 %p1, i64 %p2, i64 %p3, i64 %p4) {
8   entry:
9     %result = tail call i64 (i64, i32, i8*, i32, ...) @llvm.experimental.patchpoint.i64(i64 5, i32 5, i8* null, i32 2, i64 %p1, i64 %p2)
10     ret void
11   }
12
13   declare i64 @llvm.experimental.patchpoint.i64(i64, i32, i8*, i32, ...)
14
15 ...
16 ---
17 name:            small_patchpoint_codegen
18 tracksRegLiveness: true
19 liveins:
20   - { reg: '%rdi' }
21   - { reg: '%rsi' }
22 frameInfo:
23   hasPatchPoint: true
24   stackSize:     8
25   adjustsStack:  true
26   hasCalls:      true
27 fixedStack:
28   - { id: 0, type: spill-slot, offset: -16, size: 8, alignment: 16 }
29 body:
30   - id:          0
31     name:        entry
32     liveins:     [ '%rdi', '%rsi', '%rbp' ]
33     instructions:
34       - 'frame-setup PUSH64r killed %rbp, implicit-def %rsp, implicit %rsp'
35       - CFI_INSTRUCTION .cfi_def_cfa_offset 16
36       - 'CFI_INSTRUCTION .cfi_offset %rbp, -16'
37       - '%rbp = frame-setup MOV64rr %rsp'
38       - 'CFI_INSTRUCTION .cfi_def_cfa_register %rbp'
39 # CHECK: PATCHPOINT 5, 5, 0, 2, 0, %rdi, %rsi, csr_64, liveout(%esp, %rsp, %sp, %spl),
40       - 'PATCHPOINT 5, 5, 0, 2, 0, %rdi, %rsi, csr_64, liveout(%esp, %rsp, %sp, %spl), implicit-def dead early-clobber %r11, implicit-def %rsp, implicit-def dead %rax'
41       - '%rbp = POP64r implicit-def %rsp, implicit %rsp'
42       - RETQ
43 ...