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