diff options
author | Kazu Hirata <kazu@google.com> | 2023-02-19 22:04:47 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-02-19 22:04:47 -0800 |
commit | f8f3db27565cae8e07c2487f9714a32840c6d548 (patch) | |
tree | 163c6d5bb9f3cee2a6b886d21e2faa8b43ed7310 /llvm/lib/IR/Value.cpp | |
parent | bc8b6f62caba904e944af9b103972ac7b85a6082 (diff) | |
download | llvm-f8f3db27565cae8e07c2487f9714a32840c6d548.zip llvm-f8f3db27565cae8e07c2487f9714a32840c6d548.tar.gz llvm-f8f3db27565cae8e07c2487f9714a32840c6d548.tar.bz2 |
Use APInt::count{l,r}_{zero,one} (NFC)
Diffstat (limited to 'llvm/lib/IR/Value.cpp')
-rw-r--r-- | llvm/lib/IR/Value.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp index fa22065..1a7ee31 100644 --- a/llvm/lib/IR/Value.cpp +++ b/llvm/lib/IR/Value.cpp @@ -972,7 +972,7 @@ Align Value::getPointerAlignment(const DataLayout &DL) const { if (auto *CstInt = dyn_cast_or_null<ConstantInt>(ConstantExpr::getPtrToInt( const_cast<Constant *>(CstPtr), DL.getIntPtrType(getType()), /*OnlyIfReduced=*/true))) { - size_t TrailingZeros = CstInt->getValue().countTrailingZeros(); + size_t TrailingZeros = CstInt->getValue().countr_zero(); // While the actual alignment may be large, elsewhere we have // an arbitrary upper alignmet limit, so let's clamp to it. return Align(TrailingZeros < Value::MaxAlignmentExponent |