1 # Test MC/DC bitmap reading and merging.
5 RUN: llvm-profdata merge %t/mcdc-1.proftext %t/mcdc-2.proftext -o %t.profdata
6 RUN: llvm-profdata show %t.profdata --text -all-functions | FileCheck %s --check-prefix=MCDC
8 RUN: llvm-profdata merge %t/mcdc-1.proftext %t/mcdc-2.proftext -o %t.proftext
9 RUN: llvm-profdata show %t.proftext --text -all-functions | FileCheck %s --check-prefix=MCDC
11 MCDC: # Num Bitmap Bytes:
13 MCDC-NEXT: # Bitmap Byte Values:
15 MCDC: # Num Bitmap Bytes:
17 MCDC-NEXT: # Bitmap Byte Values:
22 RUN: llvm-profdata merge %t/mcdc-3.proftext %t/mcdc-4.proftext -o %t.profdata
23 RUN: llvm-profdata show %t.profdata --text -all-functions | FileCheck %s --check-prefix=MCDC2
25 RUN: llvm-profdata merge %t/mcdc-3.proftext %t/mcdc-4.proftext -o %t.proftext
26 RUN: llvm-profdata show %t.proftext --text -all-functions | FileCheck %s --check-prefix=MCDC2
28 MCDC2: # Num Bitmap Bytes:
30 MCDC2-NEXT: # Bitmap Byte Values:
40 # Incompatible size mismatch.
41 RUN: llvm-profdata merge %t/mcdc-2.proftext %t/mcdc-4.proftext -o %t.profdata 2>&1 | FileCheck %s --check-prefix=MCDC3
43 RUN: llvm-profdata merge %t/mcdc-2.proftext %t/mcdc-4.proftext -o %t.proftext 2>&1 | FileCheck %s --check-prefix=MCDC3
45 MCDC3: function bitmap size change detected (bitmap size mismatch)
47 # Invalid number of bitmap bytes.
48 RUN: not llvm-profdata merge %t/mcdc-3.proftext %t/mcdc-err0.proftext -o %t.proftext 2>&1 | FileCheck %s --check-prefix=MCDC4
50 MCDC4: malformed instrumentation profile data: number of bitmap bytes is not a valid integer
52 # Invalid bitmap byte.
53 RUN: not llvm-profdata merge %t/mcdc-3.proftext %t/mcdc-err1.proftext -o %t.proftext 2>&1 | FileCheck %s --check-prefix=MCDC5
55 MCDC5: malformed instrumentation profile data: bitmap byte is not a valid integer
70 # Bitmask Byte Values:
85 # Bitmask Byte Values:
103 # Bitmask Byte Values:
121 # Bitmask Byte Values:
145 # Bitmask Byte Values:
154 ;--- mcdc-err0.proftext
169 # Bitmask Byte Values:
178 ;--- mcdc-err1.proftext
193 # Bitmask Byte Values: