1 ; RUN: opt -S -partial-inliner -skip-partial-inlining-cost-analysis < %s | FileCheck %s
2 ; RUN: opt -S -passes=partial-inliner -skip-partial-inlining-cost-analysis < %s | FileCheck %s
4 %class.A = type { i32 }
5 @cond = local_unnamed_addr global i32 0, align 4
7 ; Function Attrs: uwtable
8 define void @_Z3foov() local_unnamed_addr {
10 %tmp = alloca %class.A, align 4
11 %tmp1 = bitcast %class.A* %tmp to i8*
12 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %tmp1)
13 %tmp2 = load i32, i32* @cond, align 4, !tbaa !2
14 %tmp3 = icmp eq i32 %tmp2, 0
15 br i1 %tmp3, label %bb4, label %bb5
18 call void @_ZN1A7memfuncEv(%class.A* nonnull %tmp)
21 bb5: ; preds = %bb4, %bb
22 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %tmp1)
26 ; Function Attrs: argmemonly nounwind
27 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
29 declare void @_ZN1A7memfuncEv(%class.A*) local_unnamed_addr
31 ; Function Attrs: argmemonly nounwind
32 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
34 ; Function Attrs: uwtable
35 define void @_Z3goov() local_unnamed_addr {
36 ; CHECK-LABEL: @_Z3goov()
41 ; CHECK-NOT: llvm.lifetime
44 ; CHECK: call void @_Z3foov.1.
46 tail call void @_Z3foov()
50 ; CHECK-LABEL: define internal void @_Z3foov.1.
52 ; CHECK-NEXT: %tmp = alloca %class.A
53 ; CHECK-NEXT: %tmp1 = bitcast %class.A* %tmp to i8*
54 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %tmp1)
55 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %tmp1)
56 ; CHECK-NEXT: br label %bb5.exitStub
59 !llvm.module.flags = !{!0}
62 !0 = !{i32 1, !"wchar_size", i32 4}
63 !1 = !{!"clang version 5.0.0 (trunk 304489)"}
65 !3 = !{!"int", !4, i64 0}
66 !4 = !{!"omnipotent char", !5, i64 0}
67 !5 = !{!"Simple C++ TBAA"}