llvm-profdata: Use consistent file suffixes in tests
[oota-llvm.git] / test / tools / llvm-profdata / multiple-inputs.test
1 Some very basic tests for the multiple input cases.
2
3 RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-2.proftext -o %t
4 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3
5 RUN: llvm-profdata merge %p/Inputs/foo3-2.proftext %p/Inputs/foo3-1.proftext -o %t
6 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3
7 FOO3: foo:
8 FOO3: Counters: 3
9 FOO3: Function count: 8
10 FOO3: Block counts: [7, 6]
11 FOO3: Total functions: 1
12 FOO3: Maximum function count: 8
13 FOO3: Maximum internal block count: 7
14
15 RUN: llvm-profdata merge %p/Inputs/foo4-1.proftext %p/Inputs/foo4-2.proftext -o %t
16 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4
17 RUN: llvm-profdata merge %p/Inputs/foo4-2.proftext %p/Inputs/foo4-1.proftext -o %t
18 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4
19 FOO4: foo:
20 FOO4: Counters: 4
21 FOO4: Function count: 18
22 FOO4: Block counts: [28, 38, 48]
23 FOO4: Total functions: 1
24 FOO4: Maximum function count: 18
25 FOO4: Maximum internal block count: 48
26
27 RUN: llvm-profdata merge %p/Inputs/foo3bar3-1.proftext %p/Inputs/foo3bar3-2.proftext -o %t
28 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3
29 RUN: llvm-profdata merge %p/Inputs/foo3bar3-2.proftext %p/Inputs/foo3bar3-1.proftext -o %t
30 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3
31 FOO3BAR3: foo:
32 FOO3BAR3: Counters: 3
33 FOO3BAR3: Function count: 19
34 FOO3BAR3: Block counts: [22, 28]
35 FOO3BAR3: bar:
36 FOO3BAR3: Counters: 3
37 FOO3BAR3: Function count: 36
38 FOO3BAR3: Block counts: [42, 50]
39 FOO3BAR3: Total functions: 2
40 FOO3BAR3: Maximum function count: 36
41 FOO3BAR3: Maximum internal block count: 50
42
43 RUN: llvm-profdata merge %p/Inputs/empty.proftext %p/Inputs/foo3-1.proftext -o %t
44 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY
45 FOO3EMPTY: foo:
46 FOO3EMPTY: Counters: 3
47 FOO3EMPTY: Function count: 1
48 FOO3EMPTY: Block counts: [2, 3]
49 FOO3EMPTY: Total functions: 1
50 FOO3EMPTY: Maximum function count: 1
51 FOO3EMPTY: Maximum internal block count: 3
52
53 RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3bar3-1.proftext -o %t
54 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3FOO3BAR3
55 FOO3FOO3BAR3: foo:
56 FOO3FOO3BAR3: Counters: 3
57 FOO3FOO3BAR3: Function count: 3
58 FOO3FOO3BAR3: Block counts: [5, 8]
59 FOO3FOO3BAR3: bar:
60 FOO3FOO3BAR3: Counters: 3
61 FOO3FOO3BAR3: Function count: 7
62 FOO3FOO3BAR3: Block counts: [11, 13]
63 FOO3FOO3BAR3: Total functions: 2
64 FOO3FOO3BAR3: Maximum function count: 7
65 FOO3FOO3BAR3: Maximum internal block count: 13
66
67 RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/bar3-1.proftext -o %t
68 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=DISJOINT
69 DISJOINT: foo:
70 DISJOINT: Counters: 3
71 DISJOINT: Function count: 1
72 DISJOINT: Block counts: [2, 3]
73 DISJOINT: bar:
74 DISJOINT: Counters: 3
75 DISJOINT: Function count: 1
76 DISJOINT: Block counts: [2, 3]
77 DISJOINT: Total functions: 2
78 DISJOINT: Maximum function count: 1
79 DISJOINT: Maximum internal block count: 3