1; RUN: opt < %s -inline -S | FileCheck %s 2; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s 3 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. 7 8declare i32 @callee2(i8*) 9 10define i32 @callee1(i32 %count) { 11 %a0 = alloca i8, i32 %count, align 4 12 %call0 = call i32 @callee2(i8* %a0) 13 ret i32 %call0 14} 15 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( 21 22define i32 @caller1(i32 %count) { 23 %call0 = call i32 @callee1(i32 0) 24 ret i32 %call0 25} 26