1 ; RUN: opt < %s -inline -inline-threshold=0 -inlinehint-threshold=100 -S | FileCheck %s
3 ; This tests that a hot callee gets the (higher) inlinehint-threshold even without
4 ; inline hints and gets inlined because the cost is less than inlinehint-threshold.
5 ; A cold callee with identical body does not get inlined because cost exceeds the
8 define i32 @callee1(i32 %x) !prof !1 {
16 define i32 @callee2(i32 %x) !prof !2 {
17 ; CHECK-LABEL: @callee2(
25 define i32 @caller2(i32 %y1) !prof !2 {
26 ; CHECK-LABEL: @caller2(
27 ; CHECK: call i32 @callee2
28 ; CHECK-NOT: call i32 @callee1
29 ; CHECK: ret i32 %x3.i
30 %y2 = call i32 @callee2(i32 %y1)
31 %y3 = call i32 @callee1(i32 %y2)
35 !llvm.module.flags = !{!0}
36 !0 = !{i32 1, !"MaxFunctionCount", i32 10}
37 !1 = !{!"function_entry_count", i64 10}
38 !2 = !{!"function_entry_count", i64 1}