mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
a62270de2c
The reversion apparently deleted the test/Transforms directory. Will be re-reverting again. llvm-svn: 358552
36 lines
1.0 KiB
LLVM
36 lines
1.0 KiB
LLVM
; Test that inliner skips @llvm.icall.branch.funnel
|
|
; RUN: opt < %s -inline -S | FileCheck %s
|
|
|
|
target datalayout = "e-p:64:64"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
declare void @llvm.icall.branch.funnel(...)
|
|
|
|
; CHECK-LABEL: define void @fn_musttail(
|
|
define void @fn_musttail() {
|
|
call void (...) @bf_musttail()
|
|
; CHECK: call void (...) @bf_musttail(
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: define internal void @bf_musttail(
|
|
define internal void @bf_musttail(...) {
|
|
musttail call void (...) @llvm.icall.branch.funnel(...)
|
|
; CHECK: musttail call void (...) @llvm.icall.branch.funnel(
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: define void @fn_musttail_always(
|
|
define void @fn_musttail_always() {
|
|
call void (...) @bf_musttail_always()
|
|
; CHECK: call void (...) @bf_musttail_always(
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: define internal void @bf_musttail_always(
|
|
define internal void @bf_musttail_always(...) alwaysinline {
|
|
musttail call void (...) @llvm.icall.branch.funnel(...)
|
|
; CHECK: musttail call void (...) @llvm.icall.branch.funnel(
|
|
ret void
|
|
}
|