• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: not --crash llc %s -mtriple aarch64-apple-darwin -debug-only=aarch64-call-lowering -global-isel -global-isel-abort=2 -o - 2>&1 | FileCheck %s
2; REQUIRES: asserts
3
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
9declare extern_weak void @callee_weak()
10define void @caller_weak() {
11  musttail call void @callee_weak()
12  ret void
13}
14