Debian Codegraph @

llvm/test/CodeGen/PowerPC/aix-trampoline.ll

raw
1 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s 2>&1 | \
2 ; RUN: FileCheck %s --check-prefix=32BIT
3 ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s 2>&1 -mattr=-altivec | \
4 ; RUN: FileCheck %s --check-prefix=64BIT
5
6 define void @create_trampoline(ptr %buffer, ptr %nval) nounwind {
7 entry:
8 call void @llvm.init.trampoline(ptr %buffer, ptr @nested , ptr %nval)
9 ret void
10 }
11
12 declare i32 @nested(i32);
13
14 declare void @llvm.init.trampoline(ptr, ptr, ptr) nounwind
15
16 ; 32BIT: stw 4, 8(3)
17 ; 32BIT: lwz [[FuncDesc:[0-9]+]], L..C0(2)
18 ; 32BIT-DAG: lwz [[SCRATCH1:[0-9]+]], 0([[FuncDesc]])
19 ; 32BIT-DAG: lwz [[SCRATCH2:[0-9]+]], 4([[FuncDesc]])
20 ; 32BIT-DAG: stw [[SCRATCH1]], 0(3)
21 ; 32BIT-DAG: stw [[SCRATCH2]], 4(3)
22
23 ; 64BIT: std 4, 16(3)
24 ; 64BIT-DAG: ld [[FuncDesc:[0-9]+]], L..C0(2)
25 ; 64BIT-DAG: ld [[SCRATCH1:[0-9]+]], 0([[FuncDesc]])
26 ; 64BIT-DAG: ld [[SCRATCH2:[0-9]+]], 8([[FuncDesc]])
27 ; 64BIT-DAG: std [[SCRATCH1]], 0(3)
28 ; 64BIT-DAG: std [[SCRATCH2]], 8(3)