Use llvm::count{lr}_{zero,one} (NFC)

This commit is contained in:
Kazu Hirata committed 2023-01-28 12:41:20 -08:00
1 parent a536d3e40e
commit 55e2cd1609
51 files changed
+92 -97

No files matched your search

+1 -1
View File
@@ -281,7 +281,7 @@ private:
// here because we only care about the first byte, and so that be actually
// get ctz intrinsic calls when possible (the `uint8_t` overload uses a loop
// implementation).
uint32_t numBytes = llvm::countTrailingZeros<uint32_t>(result);
uint32_t numBytes = llvm::countr_zero<uint32_t>(result);
assert(numBytes > 0 && numBytes <= 7 &&
"unexpected number of trailing zeros in varint encoding");