1 ; RUN: opt -S < %s -passes=partial-inliner -partial-inlining-extra-penalty=2000 | FileCheck %s
2 define i32 @outline_region_notlikely(ptr %arg) local_unnamed_addr {
4 ; ptr != null is predicted to be true
5 %tmp = icmp ne ptr %arg, null
6 br i1 %tmp, label %bb8, label %bb1, !prof !2
10 %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)
18 bb8: ; preds = %bb1, %bb
19 %tmp9 = phi i32 [ 0, %bb1 ], [ 1, %bb ]
23 define i32 @dummy_caller(ptr %arg) local_unnamed_addr {
24 ; CHECK-LABEL: @dummy_caller
25 %tmp = call i32 @outline_region_notlikely(ptr %arg)
30 ; CHECK-LABEL: define internal void @outline_region_notlikely.1.bb1(ptr %arg) {
31 ; CHECK-NEXT: newFuncRoot:
33 declare i32 @foo(ptr %arg)
35 !llvm.module.flags = !{!0}
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}