1# RUN: llvm-profdata show -ic-targets  -all-functions %s | FileCheck %s --check-prefixes=ICTXT,ICSUM
2# RUN: llvm-profdata show -ic-targets -counts -text -all-functions %s | FileCheck %s --check-prefix=ICTEXT
3# RUN: llvm-profdata merge -o %t.profdata  %s
4# RUN: llvm-profdata show -ic-targets  -all-functions %t.profdata | FileCheck %s --check-prefixes=IC,ICSUM
5
6foo
7# Func Hash:
810
9# Num Counters:
102
11# Counter Values:
12999000
13359800
14
15foo2
16# Func Hash:
1710
18# Num Counters:
192
20# Counter Values:
211001000
22360200
23
24main
25# Func Hash:
2616650
27# Num Counters:
284
29# Counter Values:
302
312000
322000000
33999000
34# NumValueKinds
351
36# Value Kind IPVK_IndirectCallTarget
370
38# NumSites
393
40# Values for each site
410
422
43foo:100
44foo2:1000
451
46foo2:20000
47
48#ICTXT: Indirect Call Site Count: 3
49#ICTXT-NEXT:    Indirect Target Results:
50#ICTXT-NEXT:	[ 1, foo, 100 ] (9.09%)
51#ICTXT-NEXT:	[ 1, foo2, 1000 ] (90.91%)
52#ICTXT-NEXT:	[ 2, foo2, 20000 ] (100.00%)
53
54#IC: Indirect Call Site Count: 3
55#IC-NEXT:    Indirect Target Results:
56#IC-NEXT:	[ 1, foo2, 1000 ]
57#IC-NEXT:	[ 1, foo, 100 ]
58#IC-NEXT:	[ 2, foo2, 20000 ]
59
60#ICTEXT: foo:100
61#ICTEXT-NEXT: foo2:1000
62#ICTEXT-NEXT: 1
63#ICTEXT-NEXT: foo2:20000
64#
65
66bar
67# Func Hash:
6810
69# Num Counters:
702
71# Counter Values:
72999000
73359800
74
75#ICSUM: Statistics for indirect call sites profile:
76#ICSUM: Total number of sites: 3
77#ICSUM: Total number of sites with values: 2
78#ICSUM: Total number of profiled values: 3
79#ICSUM:	NumTargets, SiteCount
80#ICSUM:	  1, 1
81#ICSUM:	  2, 1
82