xref: /aosp_15_r20/external/llvm/test/tools/llvm-profdata/multiple-inputs.test (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard WorkerSome very basic tests for the multiple input cases.
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-2.proftext -o %t
4*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3
5*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata merge %p/Inputs/foo3-2.proftext %p/Inputs/foo3-1.proftext -o %t
6*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3
7*9880d681SAndroid Build Coastguard WorkerFOO3: foo:
8*9880d681SAndroid Build Coastguard WorkerFOO3: Counters: 3
9*9880d681SAndroid Build Coastguard WorkerFOO3: Function count: 8
10*9880d681SAndroid Build Coastguard WorkerFOO3: Block counts: [7, 6]
11*9880d681SAndroid Build Coastguard WorkerFOO3: Total functions: 1
12*9880d681SAndroid Build Coastguard WorkerFOO3: Maximum function count: 8
13*9880d681SAndroid Build Coastguard WorkerFOO3: Maximum internal block count: 7
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata merge %p/Inputs/empty.proftext %p/Inputs/foo3-1.proftext -o %t
16*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY
17*9880d681SAndroid Build Coastguard WorkerFOO3EMPTY: foo:
18*9880d681SAndroid Build Coastguard WorkerFOO3EMPTY: Counters: 3
19*9880d681SAndroid Build Coastguard WorkerFOO3EMPTY: Function count: 1
20*9880d681SAndroid Build Coastguard WorkerFOO3EMPTY: Block counts: [2, 3]
21*9880d681SAndroid Build Coastguard WorkerFOO3EMPTY: Total functions: 1
22*9880d681SAndroid Build Coastguard WorkerFOO3EMPTY: Maximum function count: 1
23*9880d681SAndroid Build Coastguard WorkerFOO3EMPTY: Maximum internal block count: 3
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3bar3-1.proftext -o %t
26*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3FOO3BAR3 --check-prefix=FOO3FOO3BAR3-1
27*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3FOO3BAR3 --check-prefix=FOO3FOO3BAR3-2
28*9880d681SAndroid Build Coastguard WorkerFOO3FOO3BAR3-1: foo:
29*9880d681SAndroid Build Coastguard WorkerFOO3FOO3BAR3-1: Counters: 3
30*9880d681SAndroid Build Coastguard WorkerFOO3FOO3BAR3-1: Function count: 3
31*9880d681SAndroid Build Coastguard WorkerFOO3FOO3BAR3-1: Block counts: [5, 8]
32*9880d681SAndroid Build Coastguard WorkerFOO3FOO3BAR3-2: bar:
33*9880d681SAndroid Build Coastguard WorkerFOO3FOO3BAR3-2: Counters: 3
34*9880d681SAndroid Build Coastguard WorkerFOO3FOO3BAR3-2: Function count: 7
35*9880d681SAndroid Build Coastguard WorkerFOO3FOO3BAR3-2: Block counts: [11, 13]
36*9880d681SAndroid Build Coastguard WorkerFOO3FOO3BAR3: Total functions: 2
37*9880d681SAndroid Build Coastguard WorkerFOO3FOO3BAR3: Maximum function count: 7
38*9880d681SAndroid Build Coastguard WorkerFOO3FOO3BAR3: Maximum internal block count: 13
39*9880d681SAndroid Build Coastguard Worker
40*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/bar3-1.proftext -o %t
41*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=DISJOINT --check-prefix=DISJOINT-1
42*9880d681SAndroid Build Coastguard WorkerRUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=DISJOINT --check-prefix=DISJOINT-2
43*9880d681SAndroid Build Coastguard WorkerDISJOINT-1: foo:
44*9880d681SAndroid Build Coastguard WorkerDISJOINT-1: Counters: 3
45*9880d681SAndroid Build Coastguard WorkerDISJOINT-1: Function count: 1
46*9880d681SAndroid Build Coastguard WorkerDISJOINT-1: Block counts: [2, 3]
47*9880d681SAndroid Build Coastguard WorkerDISJOINT-2: bar:
48*9880d681SAndroid Build Coastguard WorkerDISJOINT-2: Counters: 3
49*9880d681SAndroid Build Coastguard WorkerDISJOINT-2: Function count: 1
50*9880d681SAndroid Build Coastguard WorkerDISJOINT-2: Block counts: [2, 3]
51*9880d681SAndroid Build Coastguard WorkerDISJOINT: Total functions: 2
52*9880d681SAndroid Build Coastguard WorkerDISJOINT: Maximum function count: 1
53*9880d681SAndroid Build Coastguard WorkerDISJOINT: Maximum internal block count: 3
54