brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · a24bb74 Raw
66 lines · plain
1 2;  RUN: opt < %s -passes=partial-inliner -skip-partial-inlining-cost-analysis -S | FileCheck  %s3 ; RUN: opt < %s -passes=partial-inliner -skip-partial-inlining-cost-analysis -S | FileCheck   %s4 5%"class.base" = type { ptr }6%"struct.base" = type opaque7 8@g = external local_unnamed_addr global i32, align 49 10; Function Attrs: nounwind uwtable11define i32 @callee_sinkable_bitcast(i32 %arg) local_unnamed_addr #0 {12; CHECK-LABEL:define{{.*}}@callee_sinkable_bitcast.{{[0-9]}}13; CHECK: alloca14; CHECK: call void @llvm.lifetime15bb:16  %tmp = alloca  %"class.base", align 417  %tmp2 = load i32, ptr @g, align 4, !tbaa !218  %tmp3 = add nsw i32 %tmp2, 119  %tmp4 = icmp slt i32 %arg, 020  br i1 %tmp4, label %bb6, label %bb521 22bb5:                                              ; preds = %bb23  call void @llvm.lifetime.start.p0(ptr nonnull %tmp) #224  store i32 %tmp3, ptr %tmp, align 4, !tbaa !225  store i32 %tmp3, ptr @g, align 4, !tbaa !226  call void @bar(ptr nonnull %tmp) #227  call void @llvm.lifetime.end.p0(ptr nonnull %tmp) #228  br label %bb629 30bb6:                                              ; preds = %bb5, %bb31  %tmp7 = phi i32 [ 1, %bb5 ], [ 0, %bb ]32  ret i32 %tmp733}34 35declare void @llvm.lifetime.start.p0(ptr nocapture) #136 37declare void @bar(ptr) local_unnamed_addr #238declare void @bar2(ptr, ptr) local_unnamed_addr #139 40 41; Function Attrs: argmemonly nounwind42declare void @llvm.lifetime.end.p0(ptr nocapture) #143 44; Function Attrs: nounwind uwtable45define i32 @caller(i32 %arg) local_unnamed_addr #0 {46bb:47  %tmp = tail call i32 @callee_sinkable_bitcast(i32 %arg)48  ret i32 %tmp49}50 51attributes #0 = { nounwind uwtable}52attributes #1 = { argmemonly nounwind }53attributes #2 = { nounwind }54 55!llvm.module.flags = !{!0}56!llvm.ident = !{!1}57 58!0 = !{i32 1, !"wchar_size", i32 4}59!1 = !{!"clang version 5.0.0 (trunk 303574)"}60!2 = !{!3, !3, i64 0}61!3 = !{!"int", !4, i64 0}62!4 = !{!"omnipotent char", !5, i64 0}63!5 = !{!"Simple C/C++ TBAA"}64 65 66