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