MIR Serialization: Serialize the '.cfi_def_cfa_register' CFI instruction.
[oota-llvm.git] / test / CodeGen / MIR / X86 / cfi-def-cfa-register.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 the .cfi_def_cfa_register
3 # operands correctly.
4
5 --- |
6
7   define void @func() #0 {
8   entry:
9     unreachable
10   }
11
12   attributes #0 = { "no-frame-pointer-elim"="true" }
13
14 ...
15 ---
16 name:            func
17 tracksRegLiveness: true
18 frameInfo:
19   stackSize:     8
20 fixedStack:
21   - { id: 0, type: spill-slot, offset: -16, size: 8, alignment: 16 }
22 body:
23   - id:          0
24     name:        entry
25     liveins:     [ '%rbp' ]
26     instructions:
27       - 'PUSH64r killed %rbp, implicit-def %rsp, implicit %rsp'
28       - 'CFI_INSTRUCTION .cfi_def_cfa_offset 16'
29       - 'CFI_INSTRUCTION .cfi_offset %rbp, -16'
30       - '%rbp = MOV64rr %rsp'
31       # CHECK: CFI_INSTRUCTION .cfi_def_cfa_register %rbp
32       - 'CFI_INSTRUCTION .cfi_def_cfa_register %rbp'
33 ...