[llvm] 4be22da - [CodeGen] Remove an unnecessary cast (NFC) (#152441)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 7 07:22:45 PDT 2025
Author: Kazu Hirata
Date: 2025-08-07T07:22:42-07:00
New Revision: 4be22dabc58046ddcab449368132754892242250
URL: https://github.com/llvm/llvm-project/commit/4be22dabc58046ddcab449368132754892242250
DIFF: https://github.com/llvm/llvm-project/commit/4be22dabc58046ddcab449368132754892242250.diff
LOG: [CodeGen] Remove an unnecessary cast (NFC) (#152441)
getActiveBits() already returns unsigned.
Added:
Modified:
llvm/lib/CodeGen/TargetLoweringBase.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 17a01f48f0e17..bf4c9f91d1c97 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -1008,7 +1008,7 @@ unsigned TargetLoweringBase::getBitWidthForCttzElements(
CR = CR.subtract(APInt(64, 1));
unsigned EltWidth = RetTy->getScalarSizeInBits();
- EltWidth = std::min(EltWidth, (unsigned)CR.getActiveBits());
+ EltWidth = std::min(EltWidth, CR.getActiveBits());
EltWidth = std::max(llvm::bit_ceil(EltWidth), (unsigned)8);
return EltWidth;
More information about the llvm-commits
mailing list