1 ; RUN: opt < %s -passes='require<profile-summary>,cgscc(inline)' -S | FileCheck %s
3 ; This tests that the function count of a callee gets correctly updated after it
4 ; has been inlined into a two callsites.
6 ; CHECK: @callee() !prof [[COUNT:![0-9]+]]
7 define i32 @callee() !prof !1 {
11 define i32 @caller1() !prof !2 {
12 ; CHECK-LABEL: @caller1
15 %i = call i32 @callee()
19 define i32 @caller2() !prof !3 {
20 ; CHECK-LABEL: @caller2
23 %i = call i32 @callee()
27 !llvm.module.flags = !{!0}
28 ; CHECK: [[COUNT]] = !{!"function_entry_count", i64 0}
29 !0 = !{i32 1, !"MaxFunctionCount", i32 1000}
30 !1 = !{!"function_entry_count", i64 1000}
31 !2 = !{!"function_entry_count", i64 600}
32 !3 = !{!"function_entry_count", i64 400}