1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc %s -o - | FileCheck %s
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 ; CHECK: @ %bb.0: @ %entry
11 ; CHECK-NEXT: pac r12, lr, sp
12 ; CHECK-NEXT: .save {r4, r5, r6, r7, ra_auth_code, lr}
13 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r12, lr}
14 ; CHECK-NEXT: mov r7, r3
15 ; CHECK-NEXT: mov r5, r2
16 ; CHECK-NEXT: mov r6, r1
18 ; CHECK-NEXT: movw r1, :lower16:p
19 ; CHECK-NEXT: mov r2, r5
20 ; CHECK-NEXT: movt r1, :upper16:p
21 ; CHECK-NEXT: mov r3, r7
22 ; CHECK-NEXT: ldr r4, [r1]
23 ; CHECK-NEXT: mov r1, r6
25 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r12, lr}
26 ; CHECK-NEXT: aut r12, lr, sp
29 %call = tail call i32 @g(i32 %a) #0
30 %0 = load ptr, ptr @p, align 4
31 %call1 = tail call i32 %0(i32 %call, i32 %b, i32 %c, i32 %d) #0
35 declare dso_local i32 @g(i32) local_unnamed_addr #0
37 attributes #0 = { nounwind "sign-return-address"="non-leaf"}
39 !llvm.module.flags = !{!0, !1, !2}
41 !0 = !{i32 8, !"branch-target-enforcement", i32 0}
42 !1 = !{i32 8, !"sign-return-address", i32 1}
43 !2 = !{i32 8, !"sign-return-address-all", i32 0}