xref: /llvm-project/llvm/test/CodeGen/MIR/X86/cfi-def-cfa-offset.mir (revision 40a4cbb0f200e5e0bafbd58d55c2da6daab9515d)
1# RUN: llc -mtriple=x86_64 -run-pass none -o - %s | FileCheck %s
2# This test ensures that the MIR parser parses the cfi offset operands
3# correctly.
4
5--- |
6
7  define void @test() {
8  entry:
9    %tmp = alloca [4168 x i8], align 4
10    ret void
11  }
12
13...
14---
15name:            test
16tracksRegLiveness: true
17frameInfo:
18  stackSize:       4040
19stack:
20  - { id: 0, name: tmp, offset: -4176, size: 4168, alignment: 4 }
21body: |
22  bb.0.entry:
23    $rsp = SUB64ri32 $rsp, 4040, implicit-def dead $eflags
24    ; CHECK: CFI_INSTRUCTION def_cfa_offset 4048
25    CFI_INSTRUCTION def_cfa_offset 4048
26    $rsp = ADD64ri32 $rsp, 4040, implicit-def dead $eflags
27    RET64
28...
29
30