1 ; RUN: opt -S < %s -partial-inliner -partial-inlining-extra-penalty=2000 | FileCheck %s
2 ; RUN: opt -S < %s -passes=partial-inliner -partial-inlining-extra-penalty=2000 | FileCheck %s
3 define i32 @outline_region_notlikely(i32* %arg) local_unnamed_addr {
5 ; ptr != null is predicted to be true
6 %tmp = icmp ne i32* %arg, null
7 br i1 %tmp, label %bb8, label %bb1, !prof !2
11 %tmp2 = tail call i32 @foo(i32* nonnull %arg)
12 %tmp3 = tail call i32 @foo(i32* nonnull %arg)
13 %tmp4 = tail call i32 @foo(i32* nonnull %arg)
14 %tmp5 = tail call i32 @foo(i32* nonnull %arg)
15 %tmp6 = tail call i32 @foo(i32* nonnull %arg)
16 %tmp7 = tail call i32 @foo(i32* nonnull %arg)
19 bb8: ; preds = %bb1, %bb
20 %tmp9 = phi i32 [ 0, %bb1 ], [ 1, %bb ]
24 define i32 @dummy_caller(i32* %arg) local_unnamed_addr {
25 ; CHECK-LABEL: @dummy_caller
26 %tmp = call i32 @outline_region_notlikely(i32* %arg)
31 ; CHECK-LABEL: define internal void @outline_region_notlikely.1.bb1(i32* %arg) {
32 ; CHECK-NEXT: newFuncRoot:
34 declare i32 @foo(i32 * %arg)
36 !llvm.module.flags = !{!0}
39 !0 = !{i32 1, !"wchar_size", i32 4}
40 !1 = !{!"clang version 5.0.0 (trunk 304489)"}
41 !2 = !{!"branch_weights", i32 2000, i32 1}