aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-01-15 09:04:57 -0800
committerKazu Hirata <kazu@google.com>2023-01-15 09:04:57 -0800
commit9ce7b40ad49f4e16c74d0a181c5cd25d21e417c8 (patch)
tree940bf5b9c8848fde8763a60749ff549be0df4302 /llvm/lib/Support/APInt.cpp
parent6ee5a1a090f3f4b6ae7ec9915900023277daf8d7 (diff)
downloadllvm-9ce7b40ad49f4e16c74d0a181c5cd25d21e417c8.zip
llvm-9ce7b40ad49f4e16c74d0a181c5cd25d21e417c8.tar.gz
llvm-9ce7b40ad49f4e16c74d0a181c5cd25d21e417c8.tar.bz2
Use the default parameters of countTrailingZeros and find{First,Last}Set (NFC)
This patch uses the default parameters of countTrailingZeros, findFirstSet, and findLastSet, which are ZB_Width, ZB_Max, and ZB_Max, respectively.
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r--llvm/lib/Support/APInt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index 3351c91..3b89b01 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -2293,13 +2293,13 @@ static inline APInt::WordType highHalf(APInt::WordType part) {
/// Returns the bit number of the most significant set bit of a part.
/// If the input number has no bits set -1U is returned.
static unsigned partMSB(APInt::WordType value) {
- return findLastSet(value, ZB_Max);
+ return findLastSet(value);
}
/// Returns the bit number of the least significant set bit of a part. If the
/// input number has no bits set -1U is returned.
static unsigned partLSB(APInt::WordType value) {
- return findFirstSet(value, ZB_Max);
+ return findFirstSet(value);
}
/// Sets the least significant part of a bignum to the input value, and zeroes