1 ; RUN: opt < %s -inline-threshold=0 -always-inline -S | FileCheck %s
3 ; Ensure the threshold has no impact on these decisions.
4 ; RUN: opt < %s -inline-threshold=20000000 -always-inline -S | FileCheck %s
5 ; RUN: opt < %s -inline-threshold=-20000000 -always-inline -S | FileCheck %s
7 define i32 @inner1() alwaysinline {
10 define i32 @outer1() {
15 %r = call i32 @inner1()
19 ; The always inliner can't DCE internal functions. PR2945
21 define internal i32 @pr2945() nounwind {
25 define internal void @inner2(i32 %N) alwaysinline {
26 %P = alloca i32, i32 %N
29 define void @outer2(i32 %N) {
30 ; The always inliner (unlike the normal one) should be willing to inline
31 ; a function with a dynamic alloca into one without a dynamic alloca.
35 ; CHECK-NOT: call void @inner2
36 ; CHECK alloca i32, i32 %N
37 ; CHECK-NOT: call void @inner2
40 call void @inner2( i32 %N )