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
4 ; Shouldn't tail call when the OS doesn't support it.
5 declare extern_weak void @extern_weak_fn()
6 define 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()