xref: /llvm-project/llvm/test/CodeGen/PowerPC/eh-dwarf-cfa.ll (revision 427fb35192f1f7bb694a5910b05abc5925a798b2)
1; RUN: llc < %s | FileCheck %s
2target datalayout = "e-m:e-i64:64-n32:64"
3target triple = "powerpc64le-unknown-linux-gnu"
4
5define void @_Z1fv() #0 {
6entry:
7  %0 = call ptr @llvm.eh.dwarf.cfa(i32 0)
8  call void @_Z1gPv(ptr %0)
9  ret void
10
11; CHECK-LABEL: @_Z1fv
12; CHECK: stdu 1, -[[SS:[0-9]+]](1)
13; CHECK: .cfi_def_cfa_offset [[SS]]
14; CHECK: mr 31, 1
15; CHECK: .cfi_def_cfa_register r31
16; CHECK: addi 3, 31, [[SS]]
17; CHECK-NEXT: bl _Z1gPv
18; CHECK: blr
19}
20
21declare void @_Z1gPv(ptr)
22
23; Function Attrs: nounwind
24declare ptr @llvm.eh.dwarf.cfa(i32) #1
25
26attributes #0 = { "frame-pointer"="all" "target-cpu"="ppc64le" }
27attributes #1 = { nounwind }
28
29