xref: /aosp_15_r20/external/llvm/test/CodeGen/MIR/X86/cfi-def-cfa-offset.mir (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# RUN: llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o - %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker# This test ensures that the MIR parser parses the .cfi_def_cfa_offset operands
3*9880d681SAndroid Build Coastguard Worker# correctly.
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker--- |
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker  define void @test() {
8*9880d681SAndroid Build Coastguard Worker  entry:
9*9880d681SAndroid Build Coastguard Worker    %tmp = alloca [4168 x i8], align 4
10*9880d681SAndroid Build Coastguard Worker    ret void
11*9880d681SAndroid Build Coastguard Worker  }
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker...
14*9880d681SAndroid Build Coastguard Worker---
15*9880d681SAndroid Build Coastguard Workername:            test
16*9880d681SAndroid Build Coastguard WorkertracksRegLiveness: true
17*9880d681SAndroid Build Coastguard WorkerframeInfo:
18*9880d681SAndroid Build Coastguard Worker  stackSize:       4040
19*9880d681SAndroid Build Coastguard Workerstack:
20*9880d681SAndroid Build Coastguard Worker  - { id: 0, name: tmp, offset: -4176, size: 4168, alignment: 4 }
21*9880d681SAndroid Build Coastguard Workerbody: |
22*9880d681SAndroid Build Coastguard Worker  bb.0.entry:
23*9880d681SAndroid Build Coastguard Worker    %rsp = SUB64ri32 %rsp, 4040, implicit-def dead %eflags
24*9880d681SAndroid Build Coastguard Worker    ; CHECK: CFI_INSTRUCTION .cfi_def_cfa_offset 4048
25*9880d681SAndroid Build Coastguard Worker    CFI_INSTRUCTION .cfi_def_cfa_offset 4048
26*9880d681SAndroid Build Coastguard Worker    %rsp = ADD64ri32 %rsp, 4040, implicit-def dead %eflags
27*9880d681SAndroid Build Coastguard Worker    RETQ
28*9880d681SAndroid Build Coastguard Worker...
29*9880d681SAndroid Build Coastguard Worker
30