xref: /aosp_15_r20/external/llvm/test/CodeGen/AArch64/arm64-fastcc-tailcall.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=arm64 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerdefine void @caller(i32* nocapture %p, i32 %a, i32 %b) nounwind optsize ssp {
4*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: stp
5*9880d681SAndroid Build Coastguard Worker; CHECK: b       {{_callee|callee}}
6*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: ldp
7*9880d681SAndroid Build Coastguard Worker; CHECK: ret
8*9880d681SAndroid Build Coastguard Worker  %1 = icmp eq i32 %b, 0
9*9880d681SAndroid Build Coastguard Worker  br i1 %1, label %3, label %2
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker  tail call fastcc void @callee(i32* %p, i32 %a) optsize
12*9880d681SAndroid Build Coastguard Worker  br label %3
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker  ret void
15*9880d681SAndroid Build Coastguard Worker}
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Workerdefine internal fastcc void @callee(i32* nocapture %p, i32 %a) nounwind optsize noinline ssp {
18*9880d681SAndroid Build Coastguard Worker  store volatile i32 %a, i32* %p, align 4, !tbaa !0
19*9880d681SAndroid Build Coastguard Worker  ret void
20*9880d681SAndroid Build Coastguard Worker}
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker!0 = !{!"int", !1}
23*9880d681SAndroid Build Coastguard Worker!1 = !{!"omnipotent char", !2}
24*9880d681SAndroid Build Coastguard Worker!2 = !{!"Simple C/C++ TBAA"}
25