xref: /llvm-project/llvm/test/Transforms/PGOProfile/icp_sample.ll (revision 9ff36df5a4a7d52c51e950522870bb64912688d2)
1; RUN: opt -passes=pgo-icall-prom -icp-samplepgo -S < %s | FileCheck %s
2
3define ptr @_Z3fooPi(ptr readnone returned) {
4  ret ptr %0
5}
6
7; CHECK-LABEL: _Z3barPFPiS_E
8; CHECK: if.true.direct_targ
9; CHECK:   call ptr @_Z3fooPi
10define ptr @_Z3barPFPiS_E(ptr nocapture) {
11  %2 = tail call ptr %0(ptr null), !prof !33
12  ret ptr %2
13}
14
15!llvm.module.flags = !{!3}
16
17!3 = !{i32 1, !"ProfileSummary", !4}
18!4 = !{!5, !6, !7, !8, !9, !10, !11, !12}
19!5 = !{!"ProfileFormat", !"SampleProfile"}
20!6 = !{!"TotalCount", i64 0}
21!7 = !{!"MaxCount", i64 0}
22!8 = !{!"MaxInternalCount", i64 0}
23!9 = !{!"MaxFunctionCount", i64 0}
24!10 = !{!"NumCounts", i64 1}
25!11 = !{!"NumFunctions", i64 1}
26!12 = !{!"DetailedSummary", !13}
27!13 = !{!14, !15, !16, !17, !18, !19, !19, !20, !20, !21, !22, !23, !24, !25, !26, !27, !28, !29}
28!14 = !{i32 10000, i64 0, i32 0}
29!15 = !{i32 100000, i64 0, i32 0}
30!16 = !{i32 200000, i64 0, i32 0}
31!17 = !{i32 300000, i64 0, i32 0}
32!18 = !{i32 400000, i64 0, i32 0}
33!19 = !{i32 500000, i64 0, i32 0}
34!20 = !{i32 600000, i64 0, i32 0}
35!21 = !{i32 700000, i64 0, i32 0}
36!22 = !{i32 800000, i64 0, i32 0}
37!23 = !{i32 900000, i64 0, i32 0}
38!24 = !{i32 950000, i64 0, i32 0}
39!25 = !{i32 990000, i64 0, i32 0}
40!26 = !{i32 999000, i64 0, i32 0}
41!27 = !{i32 999900, i64 0, i32 0}
42!28 = !{i32 999990, i64 0, i32 0}
43!29 = !{i32 999999, i64 0, i32 0}
44!33 = !{!"VP", i32 0, i64 100, i64 8400159624858369790, i64 100}
45