From 55e2cd16095d64e9afca6e109e40ed95d735dc7f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 28 Jan 2023 12:41:19 -0800 Subject: Use llvm::count{lr}_{zero,one} (NFC) --- mlir/lib/Bytecode/Reader/BytecodeReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mlir/lib/Bytecode/Reader/BytecodeReader.cpp') diff --git a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp index 53e5547..4a09cb7 100644 --- a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp +++ b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp @@ -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(result); + uint32_t numBytes = llvm::countr_zero(result); assert(numBytes > 0 && numBytes <= 7 && "unexpected number of trailing zeros in varint encoding"); -- cgit v1.1