xref: /llvm-project/llvm/test/CodeGen/AArch64/GlobalISel/call-translator-tail-call-weak.ll (revision 55ea639d3c576f713041c3d1832e71d92f732ee3)
1; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2; RUN: llc %s -stop-after=irtranslator -verify-machineinstrs -mtriple aarch64-apple-darwin -global-isel -o - 2>&1 | FileCheck %s --check-prefix=DARWIN
3
4; Shouldn't tail call when the OS doesn't support it.
5declare extern_weak void @extern_weak_fn()
6define void @test_extern_weak() {
7  ; DARWIN-LABEL: name: test_extern_weak
8  ; DARWIN: bb.1 (%ir-block.0):
9  ; DARWIN:   ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp
10  ; DARWIN:   BL @extern_weak_fn, csr_darwin_aarch64_aapcs, implicit-def $lr, implicit $sp
11  ; DARWIN:   ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp
12  ; DARWIN:   RET_ReallyLR
13  tail call void @extern_weak_fn()
14  ret void
15}
16