[llvm] [llvm-profdata] Reject merging single-byte-coverage with count profiles (PR #213177)

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 12:16:54 PDT 2026


================
@@ -167,6 +167,10 @@ static std::string getInstrProfErrString(instrprof_error Err,
   case instrprof_error::counter_value_too_large:
     OS << "excessively large counter value suggests corrupted profile data";
     break;
+  case instrprof_error::coverage_count_mismatch:
+    OS << "cannot merge single-byte-coverage profiles with count "
+          "(non-coverage) profiles";
----------------
petrhosek wrote:

This error message is making the assumption that single-byte counters are specific to coverage and incrementing counters are specific to profiles but that's not true, it's perfectly fine to still use incrementing counters for coverage (using single-byte counters for PGO is less useful).

```suggestion
    OS << "cannot merge single-byte and incrementing counter profiles";
```

https://github.com/llvm/llvm-project/pull/213177


More information about the llvm-commits mailing list