llvm-project/llvm/test/CodeGen/X86/tailcc-notail.ll
Tim Northover 9ff2eb1ea5 SwiftTailCC: teach verifier musttail rules applicable to this CC.
SwiftTailCC has a different set of requirements than the C calling convention
for a tail call. The exact argument sequence doesn't have to match, but fewer
ABI-affecting attributes are allowed.

Also make sure the musttail diagnostic triggers if a musttail call isn't
actually a tail call.
2021-05-28 11:12:00 +01:00

9 lines
318 B
LLVM

; RUN: not --crash llc -mtriple=x86_64-linux-gnu %s -o - 2>&1 | FileCheck %s
; CHECK: LLVM ERROR: failed to perform tail call elimination on a call site marked musttail
declare tailcc [16 x i64] @callee()
define tailcc [16 x i64] @caller() {
%res = musttail call tailcc [16 x i64] @callee()
ret [16 x i64] %res
}