2018-05-24 06:44:08 +08:00
|
|
|
; Check that we error out if tail is not possible but call is marked as mustail.
|
|
|
|
|
2020-02-12 15:01:35 +08:00
|
|
|
; RUN: not --crash llc -mtriple riscv32-unknown-linux-gnu -o - %s \
|
2018-05-24 06:44:08 +08:00
|
|
|
; RUN: 2>&1 | FileCheck %s
|
2020-02-12 15:01:35 +08:00
|
|
|
; RUN: not --crash llc -mtriple riscv32-unknown-elf -o - %s \
|
2018-05-24 06:44:08 +08:00
|
|
|
; RUN: 2>&1 | FileCheck %s
|
2020-02-12 15:01:35 +08:00
|
|
|
; RUN: not --crash llc -mtriple riscv64-unknown-linux-gnu -o - %s \
|
2018-05-24 06:44:08 +08:00
|
|
|
; RUN: 2>&1 | FileCheck %s
|
2020-02-12 15:01:35 +08:00
|
|
|
; RUN: not --crash llc -mtriple riscv64-unknown-elf -o - %s \
|
2018-05-24 06:44:08 +08:00
|
|
|
; RUN: 2>&1 | FileCheck %s
|
|
|
|
|
|
|
|
%struct.A = type { i32 }
|
|
|
|
|
2020-11-21 03:07:11 +08:00
|
|
|
declare void @callee_musttail(%struct.A* sret(%struct.A) %a)
|
|
|
|
define void @caller_musttail(%struct.A* sret(%struct.A) %a) {
|
2018-05-24 06:44:08 +08:00
|
|
|
; CHECK: LLVM ERROR: failed to perform tail call elimination on a call site marked musttail
|
|
|
|
entry:
|
2020-11-21 03:07:11 +08:00
|
|
|
musttail call void @callee_musttail(%struct.A* sret(%struct.A) %a)
|
2018-05-24 06:44:08 +08:00
|
|
|
ret void
|
|
|
|
}
|