• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Test that inliner skips @llvm.icall.branch.funnel
2; RUN: opt < %s -inline -S | FileCheck %s
3
4target datalayout = "e-p:64:64"
5target triple = "x86_64-unknown-linux-gnu"
6
7declare void @llvm.icall.branch.funnel(...)
8
9; CHECK-LABEL: define void @fn_musttail(
10define void @fn_musttail() {
11  call void (...) @bf_musttail()
12  ; CHECK: call void (...) @bf_musttail(
13  ret void
14}
15
16; CHECK-LABEL: define internal void @bf_musttail(
17define internal void @bf_musttail(...) {
18  musttail call void (...) @llvm.icall.branch.funnel(...)
19  ; CHECK: musttail call void (...) @llvm.icall.branch.funnel(
20  ret void
21}
22
23; CHECK-LABEL: define void @fn_musttail_always(
24define void @fn_musttail_always() {
25  call void (...) @bf_musttail_always()
26  ; CHECK: call void (...) @bf_musttail_always(
27  ret void
28}
29
30; CHECK-LABEL: define internal void @bf_musttail_always(
31define internal void @bf_musttail_always(...) alwaysinline {
32  musttail call void (...) @llvm.icall.branch.funnel(...)
33  ; CHECK: musttail call void (...) @llvm.icall.branch.funnel(
34  ret void
35}
36