brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 160fb12 Raw
41 lines · plain
1; RUN: opt -S < %s -passes=partial-inliner -partial-inlining-extra-penalty=2000 | FileCheck %s2define i32 @outline_region_notlikely(ptr %arg) local_unnamed_addr {3bb:4;  ptr != null is predicted to be true5  %tmp = icmp ne ptr %arg, null6  br i1 %tmp, label %bb8, label %bb1, !prof !27 8; bb1 is not likely9bb1:                                              ; preds = %bb10  %tmp2 = tail call i32 @foo(ptr nonnull %arg)11  %tmp3 = tail call i32 @foo(ptr nonnull %arg)12  %tmp4 = tail call i32 @foo(ptr nonnull %arg)13  %tmp5 = tail call i32 @foo(ptr nonnull %arg)14  %tmp6 = tail call i32 @foo(ptr nonnull %arg)15  %tmp7 = tail call i32 @foo(ptr nonnull %arg)16  br label %bb817 18bb8:                                              ; preds = %bb1, %bb19  %tmp9 = phi i32 [ 0, %bb1 ], [ 1, %bb ]20  ret i32 %tmp921}22 23define i32 @dummy_caller(ptr %arg) local_unnamed_addr {24; CHECK-LABEL: @dummy_caller25  %tmp = call i32 @outline_region_notlikely(ptr %arg)26  ret i32 %tmp27 }28 29 30; CHECK-LABEL: define internal void @outline_region_notlikely.1.bb1(ptr %arg) {31; CHECK-NEXT: newFuncRoot:32 33declare i32 @foo(ptr %arg)34 35!llvm.module.flags = !{!0}36!llvm.ident = !{!1}37 38!0 = !{i32 1, !"wchar_size", i32 4}39!1 = !{!"clang version 5.0.0 (trunk 304489)"}40!2 = !{!"branch_weights", i32 2000, i32 1}41