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