mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
0d47a2dcc0
This patch lowers the tail pseudoinstruction. This has been modeled after ARM's tail call opt. llvm-svn: 333137
21 lines
716 B
LLVM
21 lines
716 B
LLVM
; Check that we error out if tail is not possible but call is marked as mustail.
|
|
|
|
; RUN: not llc -mtriple riscv32-unknown-linux-gnu -o - %s \
|
|
; RUN: 2>&1 | FileCheck %s
|
|
; RUN: not llc -mtriple riscv32-unknown-elf -o - %s \
|
|
; RUN: 2>&1 | FileCheck %s
|
|
; RUN: not llc -mtriple riscv64-unknown-linux-gnu -o - %s \
|
|
; RUN: 2>&1 | FileCheck %s
|
|
; RUN: not llc -mtriple riscv64-unknown-elf -o - %s \
|
|
; 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
|
|
}
|