1 ; RUN: opt < %s -passes=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.base" = type { ptr }
5 %"struct.base" = type opaque
7 @g = external local_unnamed_addr global i32, align 4
9 define i32 @callee_no_bitcast(i32 %arg) local_unnamed_addr #0 {
10 ; CHECK-LABEL:define{{.*}}@callee_no_bitcast.{{[0-9]}}
12 ; CHECK: call void @llvm.lifetime
14 %tmp = alloca i8, align 4
15 %tmp2 = load i32, ptr @g, align 4, !tbaa !2
16 %tmp3 = add nsw i32 %tmp2, 1
17 %tmp4 = icmp slt i32 %arg, 0
18 br i1 %tmp4, label %bb6, label %bb5
21 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tmp) #2
22 store i32 %tmp3, ptr @g, align 4, !tbaa !2
23 call void @bar(ptr nonnull %tmp) #2
24 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tmp) #2
27 bb6: ; preds = %bb5, %bb
28 %tmp7 = phi i32 [ 1, %bb5 ], [ 0, %bb ]
32 ; Function Attrs: argmemonly nounwind
33 declare void @llvm.lifetime.start.p0(i64, ptr nocapture) #1
35 declare void @bar(ptr) local_unnamed_addr #2
36 declare void @bar2(ptr, ptr) local_unnamed_addr #1
39 ; Function Attrs: argmemonly nounwind
40 declare void @llvm.lifetime.end.p0(i64, ptr nocapture) #1
42 ; Function Attrs: nounwind uwtable
43 define i32 @caller(i32 %arg) local_unnamed_addr #0 {
45 %tmp = tail call i32 @callee_no_bitcast(i32 %arg)
49 attributes #0 = { nounwind uwtable}
50 attributes #1 = { argmemonly nounwind }
51 attributes #2 = { nounwind }
53 !llvm.module.flags = !{!0}
56 !0 = !{i32 1, !"wchar_size", i32 4}
57 !1 = !{!"clang version 5.0.0 (trunk 303574)"}
59 !3 = !{!"int", !4, i64 0}
60 !4 = !{!"omnipotent char", !5, i64 0}
61 !5 = !{!"Simple C/C++ TBAA"}