1 ; RUN: llvm-as < %s | opt -inline | llvm-dis | grep call
2 ; Do not inline calls to variable-sized alloca.
4 @q = common global i8* null ; <i8**> [#uses=1]
6 define i8* @a(i32 %i) nounwind {
8 %i_addr = alloca i32 ; <i32*> [#uses=2]
9 %retval = alloca i8* ; <i8**> [#uses=1]
10 %p = alloca i8* ; <i8**> [#uses=2]
11 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
12 store i32 %i, i32* %i_addr
13 %0 = load i32* %i_addr, align 4 ; <i32> [#uses=1]
14 %1 = alloca i8, i32 %0 ; <i8*> [#uses=1]
15 store i8* %1, i8** %p, align 4
16 %2 = load i8** %p, align 4 ; <i8*> [#uses=1]
17 store i8* %2, i8** @q, align 4
20 return: ; preds = %entry
21 %retval1 = load i8** %retval ; <i8*> [#uses=1]
25 define void @b(i32 %i) nounwind {
27 %i_addr = alloca i32 ; <i32*> [#uses=2]
28 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
29 store i32 %i, i32* %i_addr
30 %0 = load i32* %i_addr, align 4 ; <i32> [#uses=1]
31 %1 = call i8* @a(i32 %0) nounwind ; <i8*> [#uses=0]
34 return: ; preds = %entry