1 ; RUN: opt < %s -inline -S | FileCheck %s
2 ; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
3 ; Do not inline calls with variable-sized alloca.
5 @q = common global i8* null
7 define i8* @a(i32 %i) nounwind {
8 ; CHECK-LABEL: define i8* @a
13 %"alloca point" = bitcast i32 0 to i32
14 store i32 %i, i32* %i_addr
15 %0 = load i32, i32* %i_addr, align 4
16 %1 = alloca i8, i32 %0
17 store i8* %1, i8** %p, align 4
18 %2 = load i8*, i8** %p, align 4
19 store i8* %2, i8** @q, align 4
23 %retval1 = load i8*, i8** %retval
27 define void @b(i32 %i) nounwind {
28 ; CHECK-LABEL: define void @b
31 %"alloca point" = bitcast i32 0 to i32
32 store i32 %i, i32* %i_addr
33 %0 = load i32, i32* %i_addr, align 4
34 %1 = call i8* @a(i32 %0) nounwind