27 lines · plain
1; RUN: opt < %s -passes=inline -S | FileCheck %s2; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s3; RUN: opt < %s -passes='module-inline' -S | FileCheck %s4 5; InlineFunction would assert inside the loop that leaves lifetime markers if6; there was an zero-sized AllocaInst. Check that it doesn't assert and doesn't7; leave lifetime markers in that case.8 9declare i32 @callee2(ptr)10 11define i32 @callee1(i32 %count) {12 %a0 = alloca i8, i32 %count, align 413 %call0 = call i32 @callee2(ptr %a0)14 ret i32 %call015}16 17; CHECK-LABEL: define i32 @caller1(18; CHECK: [[ALLOCA:%[a-z0-9\.]+]] = alloca i819; CHECK-NOT: call void @llvm.lifetime.start.p0(20; CHECK: call i32 @callee2(ptr [[ALLOCA]])21; CHECK-NOT: call void @llvm.lifetime.end.p0(22 23define i32 @caller1(i32 %count) {24 %call0 = call i32 @callee1(i32 0)25 ret i32 %call026}27