1 ; RUN: llc %s -o - | FileCheck %s --check-prefix=CHECK1
2 ; RUN: llc %s -o - | FileCheck %s --check-prefix=CHECK2
3 target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
4 target triple = "thumbv8.1m.main-arm-unknown-eabi"
6 @p = hidden local_unnamed_addr global ptr null, align 4
8 define hidden i32 @f(i32 %a, i32 %b, i32 %c, i32 %d) local_unnamed_addr #0 {
10 %call = tail call i32 @g(i32 %a) #0
11 %0 = load ptr, ptr @p, align 4
12 %call1 = tail call i32 %0(i32 %call, i32 %b, i32 %c, i32 %d) #0
18 ; CHECK1: aut r12, lr, sp
24 ; CHECK2-NEXT: ldr r12, [sp], #4
25 ; CHECK2-NEXT: pop.w {r4, r5, r6, r7, lr}
26 ; CHECK2-NEXT: aut r12, lr, sp
29 declare dso_local i32 @g(i32) local_unnamed_addr #0
31 attributes #0 = { nounwind }
33 !llvm.module.flags = !{!0, !1, !2}
35 !0 = !{i32 8, !"branch-target-enforcement", i32 0}
36 !1 = !{i32 8, !"sign-return-address", i32 1}
37 !2 = !{i32 8, !"sign-return-address-all", i32 0}