1 ; RUN: opt < %s -passes=inline -S | FileCheck %s
2 ; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
3 ; RUN: opt < %s -passes='module-inline' -S | FileCheck %s
5 ; InlineFunction would assert inside the loop that leaves lifetime markers if
6 ; there was an zero-sized AllocaInst. Check that it doesn't assert and doesn't
7 ; leave lifetime markers in that case.
9 declare i32 @callee2(ptr)
11 define i32 @callee1(i32 %count) {
12 %a0 = alloca i8, i32 %count, align 4
13 %call0 = call i32 @callee2(ptr %a0)
17 ; CHECK-LABEL: define i32 @caller1(
18 ; CHECK: [[ALLOCA:%[a-z0-9\.]+]] = alloca i8
19 ; CHECK-NOT: call void @llvm.lifetime.start.p0(
20 ; CHECK: call i32 @callee2(ptr [[ALLOCA]])
21 ; CHECK-NOT: call void @llvm.lifetime.end.p0(
23 define i32 @caller1(i32 %count) {
24 %call0 = call i32 @callee1(i32 0)