1 ; RUN: opt < %s -passes=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 ptr null
7 define ptr @a(i32 %i) nounwind {
8 ; CHECK-LABEL: define ptr @a
13 %"alloca point" = bitcast i32 0 to i32
14 store i32 %i, ptr %i_addr
15 %0 = load i32, ptr %i_addr, align 4
16 %1 = alloca i8, i32 %0
17 store ptr %1, ptr %p, align 4
18 %2 = load ptr, ptr %p, align 4
19 store ptr %2, ptr @q, align 4
23 %retval1 = load ptr, ptr %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, ptr %i_addr
33 %0 = load i32, ptr %i_addr, align 4
34 %1 = call ptr @a(i32 %0) nounwind