1 ; RUN: opt < %s -skip-partial-inlining-cost-analysis -partial-inliner -S | FileCheck %s
2 ; RUN: opt < %s -skip-partial-inlining-cost-analysis -passes=partial-inliner -S | FileCheck %s
4 define i32 @Func(i1 %cond, i32* align 4 %align.val) !prof !1 {
5 ; CHECK: @Func({{.*}}) !prof [[REMAINCOUNT:![0-9]+]]
7 br i1 %cond, label %if.then, label %return
9 ; Dummy store to have more than 0 uses
10 store i32 10, i32* %align.val, align 4
12 return: ; preds = %entry
16 define internal i32 @Caller1(i1 %cond, i32* align 2 %align.val) !prof !3{
18 ; CHECK-LABEL: @Caller1
20 ; CHECK: call void @Func.1.
22 ; CHECK: call void @Func.1.
23 %val = call i32 @Func(i1 %cond, i32* %align.val)
24 %val2 = call i32 @Func(i1 %cond, i32* %align.val)
28 define internal i32 @Caller2(i1 %cond, i32* align 2 %align.val) !prof !2{
30 ; CHECK-LABEL: @Caller2
32 ; CHECK: call void @Func.1.
33 %val = call i32 @Func(i1 %cond, i32* %align.val)
37 ; CHECK: [[REMAINCOUNT]] = !{!"function_entry_count", i64 150}
38 !1 = !{!"function_entry_count", i64 200}
39 !2 = !{!"function_entry_count", i64 10}
40 !3 = !{!"function_entry_count", i64 20}