1 ; Check the recursive inliner doesn't inline a function with a stack size exceeding a given limit.
2 ; RUN: opt < %s -passes=inline -S | FileCheck --check-prefixes=ALL,UNLIMITED %s
3 ; RUN: opt < %s -passes=inline -S -recursive-inline-max-stacksize=256 | FileCheck --check-prefixes=ALL,LIMITED %s
5 declare void @init(ptr)
7 define internal i32 @foo() {
8 %1 = alloca [65 x i32], align 16
9 call void @init(ptr %1)
10 %2 = load i32, ptr %1, align 4
17 ; ALL: define {{.*}}@bar
19 ; UNLIMITED-NOT: call {{.*}}@foo
20 ; LIMITED-NOT: call {{.*}}@foo
23 ; Check that, under the tighter limit, baz() doesn't inline foo()
29 ; ALL: define {{.*}}@baz
31 ; UNLIMITED-NOT: call {{.*}}@foo
32 ; LIMITED: call {{.*}}@foo