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
6 @cond = local_unnamed_addr global i32 0, align 4
8 ; Function Attrs: uwtable
9 define void @_Z3foov() local_unnamed_addr {
11 %tmp = alloca %class.A, align 1
12 %tmp1 = getelementptr inbounds %class.A, %class.A* %tmp, i64 0, i32 0
13 call void @llvm.lifetime.start.p0i8(i64 1, i8* nonnull %tmp1)
14 %tmp2 = load i32, i32* @cond, align 4, !tbaa !2
15 %tmp3 = icmp eq i32 %tmp2, 0
16 br i1 %tmp3, label %bb4, label %bb5
19 call void @_ZN1A7memfuncEv(%class.A* nonnull %tmp)
22 bb5: ; preds = %bb4, %bb
23 call void @llvm.lifetime.end.p0i8(i64 1, i8* nonnull %tmp1)
27 ; Function Attrs: argmemonly nounwind
28 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
30 declare void @_ZN1A7memfuncEv(%class.A*) local_unnamed_addr
32 ; Function Attrs: argmemonly nounwind
33 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
35 ; Function Attrs: uwtable
36 define void @_Z3goov() local_unnamed_addr {
37 ; CHECK-LABEL: @_Z3goov()
41 ; CHECK-NOT: getelementptr
42 ; CHECK-NOT: llvm.lifetime
45 ; 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 = getelementptr
54 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8
55 ; CHECK: call void @llvm.lifetime.end.p0i8
56 ; CHECK-NEXT: br label %bb5.exitStub
58 !llvm.module.flags = !{!0}
61 !0 = !{i32 1, !"wchar_size", i32 4}
62 !1 = !{!"clang version 5.0.0 (trunk 304489)"}
64 !3 = !{!"int", !4, i64 0}
65 !4 = !{!"omnipotent char", !5, i64 0}
66 !5 = !{!"Simple C++ TBAA"}