71 lines · plain
1; RUN: opt < %s -passes=partial-inliner -skip-partial-inlining-cost-analysis -S | FileCheck %s2; RUN: opt < %s -passes=partial-inliner -skip-partial-inlining-cost-analysis -S | FileCheck %s3 4%"class.base" = type { ptr }5%"struct.base" = type opaque6 7@g = external local_unnamed_addr global i32, align 48 9; CHECK-LABEL: define{{.*}}@caller(10; CHECK: call void @llvm.lifetime.start.p0(ptr %tmp.i)11; CHECK-NEXT: call void @callee_unknown_use1.{{.*}}(ptr %tmp.i12 13define i32 @callee_unknown_use1(i32 %arg) local_unnamed_addr #0 {14; CHECK-LABEL:define{{.*}}@callee_unknown_use1.{{[0-9]}}15; CHECK-NOT: alloca16bb:17 %tmp = alloca i8, align 418 %tmp2 = load i32, ptr @g, align 4, !tbaa !219 %tmp3 = add nsw i32 %tmp2, 120 %tmp4 = icmp slt i32 %arg, 021 br i1 %tmp4, label %bb6, label %bb522 23bb5: ; preds = %bb24 call void @llvm.lifetime.start.p0(ptr nonnull %tmp) #225 store i32 %tmp3, ptr @g, align 4, !tbaa !226 %tmp11 = bitcast ptr %tmp to ptr27 call void @bar(ptr nonnull %tmp11) #228 call void @llvm.lifetime.end.p0(ptr nonnull %tmp) #229 br label %bb630 31bb6: ; preds = %bb5, %bb32 %tmp7 = phi i32 [ 1, %bb5 ], [ 0, %bb ]33 %tmp1 = bitcast ptr %tmp to ptr34 ret i32 %tmp735}36 37 38; Function Attrs: argmemonly nounwind39declare void @llvm.lifetime.start.p0(ptr nocapture) #140 41declare void @bar(ptr) local_unnamed_addr #242declare void @bar2(ptr, ptr) local_unnamed_addr #143 44 45; Function Attrs: argmemonly nounwind46declare void @llvm.lifetime.end.p0(ptr nocapture) #147 48; Function Attrs: nounwind uwtable49define i32 @caller(i32 %arg) local_unnamed_addr #0 {50bb:51 %tmp = tail call i32 @callee_unknown_use1(i32 %arg)52 ret i32 %tmp53}54 55attributes #0 = { nounwind uwtable}56attributes #1 = { argmemonly nounwind }57attributes #2 = { nounwind }58 59!llvm.module.flags = !{!0}60!llvm.ident = !{!1}61 62!0 = !{i32 1, !"wchar_size", i32 4}63!1 = !{!"clang version 5.0.0 (trunk 303574)"}64!2 = !{!3, !3, i64 0}65!3 = !{!"int", !4, i64 0}66!4 = !{!"omnipotent char", !5, i64 0}67!5 = !{!"Simple C/C++ TBAA"}68 69 70 71