1 ; RUN: not llc %s -mtriple aarch64-apple-darwin -debug-only=aarch64-call-lowering -global-isel -global-isel-abort=2 -o - 2>&1 | FileCheck %s
4 ; Verify that we fall back to SelectionDAG, and error out when we can't tail call musttail functions
5 ; CHECK: ... Cannot tail call externally-defined function with weak linkage for this OS.
6 ; CHECK-NEXT: Failed to lower musttail call as tail call
7 ; CHECK-NEXT: warning: Instruction selection used fallback path for caller_weak
8 ; CHECK-NEXT: LLVM ERROR: failed to perform tail call elimination on a call site marked musttail
9 declare extern_weak void @callee_weak()
10 define void @caller_weak() {
11 musttail call void @callee_weak()