brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 22c0baf Raw
65 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 9define i32 @callee_no_bitcast(i32 %arg) local_unnamed_addr #0 {10; CHECK-LABEL:define{{.*}}@callee_no_bitcast.{{[0-9]}}11; CHECK: alloca12; CHECK: call void @llvm.lifetime13bb:14  %tmp = alloca i8, align 415  %tmp2 = load i32, ptr @g, align 4, !tbaa !216  %tmp3 = add nsw i32 %tmp2, 117  %tmp4 = icmp slt i32 %arg, 018  br i1 %tmp4, label %bb6, label %bb519 20bb5:                                              ; preds = %bb21  call void @llvm.lifetime.start.p0(ptr nonnull %tmp) #222  store i32 %tmp3, ptr @g, align 4, !tbaa !223  call void @bar(ptr nonnull %tmp) #224  call void @llvm.lifetime.end.p0(ptr nonnull %tmp) #225  br label %bb626 27bb6:                                              ; preds = %bb5, %bb28  %tmp7 = phi i32 [ 1, %bb5 ], [ 0, %bb ]29  ret i32 %tmp730}31 32; Function Attrs: argmemonly nounwind33declare void @llvm.lifetime.start.p0(ptr nocapture) #134 35declare void @bar(ptr) local_unnamed_addr #236declare void @bar2(ptr, ptr) local_unnamed_addr #137 38 39; Function Attrs: argmemonly nounwind40declare void @llvm.lifetime.end.p0(ptr nocapture) #141 42; Function Attrs: nounwind uwtable43define i32 @caller(i32 %arg) local_unnamed_addr #0 {44bb:45  %tmp = tail call i32 @callee_no_bitcast(i32 %arg)46  ret i32 %tmp47}48 49attributes #0 = { nounwind uwtable}50attributes #1 = { argmemonly nounwind }51attributes #2 = { nounwind }52 53!llvm.module.flags = !{!0}54!llvm.ident = !{!1}55 56!0 = !{i32 1, !"wchar_size", i32 4}57!1 = !{!"clang version 5.0.0 (trunk 303574)"}58!2 = !{!3, !3, i64 0}59!3 = !{!"int", !4, i64 0}60!4 = !{!"omnipotent char", !5, i64 0}61!5 = !{!"Simple C/C++ TBAA"}62 63 64 65