1 ; RUN: llc < %s -march=xcore | FileCheck %s
3 %struct.FRAME.f = type { i32, ptr }
5 define void @f() nounwind {
8 ; CHECK: ldap r11, g.1101
9 ; CHECK: stw r11, sp[7]
10 %TRAMP.23 = alloca [20 x i8], align 2
11 %FRAME.0 = alloca %struct.FRAME.f, align 4
12 call void @llvm.init.trampoline(ptr %TRAMP.23, ptr @g.1101, ptr %FRAME.0)
13 %tramp = call ptr @llvm.adjust.trampoline(ptr %TRAMP.23)
14 %0 = getelementptr inbounds %struct.FRAME.f, ptr %FRAME.0, i32 0, i32 1
15 store ptr %tramp, ptr %0, align 4
16 store i32 1, ptr %FRAME.0, align 4
17 call void @h(ptr %tramp) nounwind
21 define internal i32 @g.1101(ptr nocapture nest %CHAIN.1) nounwind readonly {
24 ; CHECK: ldw r11, sp[0]
25 ; CHECK-NEXT: ldw r0, r11[0]
27 %0 = load i32, ptr %CHAIN.1, align 4
31 declare void @llvm.init.trampoline(ptr, ptr, ptr) nounwind
32 declare ptr @llvm.adjust.trampoline(ptr) nounwind