aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-07-26 19:03:47 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-07-26 19:04:23 +0000
commit7fa27ce4a07f19b07799a767fc29416f3b625afb (patch)
tree27825c83636c4de341eb09a74f49f5d38a15d165 /llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
parente3b557809604d036af6e00c60f012c2025b59a5e (diff)
downloadsrc-7fa27ce4a07f19b07799a767fc29416f3b625afb.tar.gz
src-7fa27ce4a07f19b07799a767fc29416f3b625afb.zip
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
index 855c4ac4bca2..5aad71a0a1c9 100644
--- a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
@@ -1170,9 +1170,9 @@ void HexagonDAGToDAGISel::ppAddrRewriteAndSrl(std::vector<SDNode*> &&Nodes) {
continue;
uint32_t Mask = MN->getZExtValue();
// Examine the mask.
- uint32_t TZ = countTrailingZeros(Mask);
- uint32_t M1 = countTrailingOnes(Mask >> TZ);
- uint32_t LZ = countLeadingZeros(Mask);
+ uint32_t TZ = llvm::countr_zero(Mask);
+ uint32_t M1 = llvm::countr_one(Mask >> TZ);
+ uint32_t LZ = llvm::countl_zero(Mask);
// Trailing zeros + middle ones + leading zeros must equal the width.
if (TZ + M1 + LZ != 32)
continue;
@@ -1867,7 +1867,7 @@ static unsigned getPowerOf2Factor(SDValue Val) {
continue;
const APInt &CInt = C->getAPIntValue();
if (CInt.getBoolValue())
- MaxFactor = CInt.countTrailingZeros();
+ MaxFactor = CInt.countr_zero();
}
return MaxFactor;
}