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 = alloca %class.A, align 4
12 %tmp2 = bitcast %class.A* %tmp to i8*
13 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %tmp2)
14 %tmp3 = bitcast %class.A* %tmp1 to i8*
15 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %tmp3)
16 %tmp4 = load i32, i32* @cond, align 4, !tbaa !2
17 %tmp5 = icmp eq i32 %tmp4, 0
18 br i1 %tmp5, label %bb6, label %bb7
21 call void @_ZN1A7memfuncEv(%class.A* nonnull %tmp)
24 bb7: ; preds = %bb6, %bb
25 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %tmp3)
26 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %tmp2)
30 ; Function Attrs: argmemonly nounwind
31 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
33 declare void @_ZN1A7memfuncEv(%class.A*) local_unnamed_addr
35 ; Function Attrs: argmemonly nounwind
36 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
38 ; Function Attrs: uwtable
39 define void @_Z3goov() local_unnamed_addr {
41 tail call void @_Z3foov()
45 ; CHECK-LABEL: define internal void @_Z3foov.1.
50 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8
52 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8
53 ; CHECK: call void @llvm.lifetime.end.p0i8
54 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8
55 ; CHECK-NEXT: br label {{.*}}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"}