xref: /llvm-project/llvm/test/Transforms/SampleProfile/pseudo-probe-profile-mismatch-thinlto.ll (revision c98da372cb08cd3b3c513a6a86592b0f2892fb49)
14bb6bbb9Swlei; REQUIRES: x86_64-linux
24bb6bbb9Swlei; RUN: opt < %S/pseudo-probe-stale-profile-matching-lto.ll -passes='thinlto<O2>' -pgo-kind=pgo-sample-use-pipeline -sample-profile-file=%S/Inputs/pseudo-probe-stale-profile-matching-lto.prof -report-profile-staleness -persist-profile-staleness  -S 2>%t -o %t.ll
34bb6bbb9Swlei; RUN: FileCheck %s --input-file %t
44bb6bbb9Swlei; RUN: FileCheck %s --input-file %t.ll -check-prefix=CHECK-MD
54bb6bbb9Swlei
64bb6bbb9Swlei; CHECK: (1/1) of functions' profile are invalid and  (6822/6822) of samples are discarded due to function hash mismatch.
7*c98da372SLei Wang; CHECK: (4/4) of callsites' profile are invalid and (5026/6822) of samples are discarded due to callsite location mismatch.
8*c98da372SLei Wang; CHECK: (4/4) of callsites and (5026/5026) of samples are recovered by stale profile matching.
94bb6bbb9Swlei
10*c98da372SLei Wang; CHECK-MD: ![[#]] = !{!"NumStaleProfileFunc", i64 1, !"TotalProfiledFunc", i64 1, !"MismatchedFunctionSamples", i64 6822, !"TotalFunctionSamples", i64 6822, !"NumMismatchedCallsites", i64 0, !"NumRecoveredCallsites", i64 4, !"TotalProfiledCallsites", i64 4, !"MismatchedCallsiteSamples", i64 0, !"RecoveredCallsiteSamples", i64 5026}
11