aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantFold.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-02-19 23:56:52 -0800
committerKazu Hirata <kazu@google.com>2023-02-19 23:56:52 -0800
commita28b252d852c31fb7228e095a213347e6926bb0f (patch)
treef6c8c2ce5a40b70c93f8498cffba9bb43979b873 /llvm/lib/IR/ConstantFold.cpp
parent2dfa957f120244ddc0238b548282f67d89f1a832 (diff)
downloadllvm-a28b252d852c31fb7228e095a213347e6926bb0f.zip
llvm-a28b252d852c31fb7228e095a213347e6926bb0f.tar.gz
llvm-a28b252d852c31fb7228e095a213347e6926bb0f.tar.bz2
Use APInt::getSignificantBits instead of APInt::getMinSignedBits (NFC)
Note that getMinSignedBits has been soft-deprecated in favor of getSignificantBits.
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r--llvm/lib/IR/ConstantFold.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index 9a48f34..553bc1e 100644
--- a/llvm/lib/IR/ConstantFold.cpp
+++ b/llvm/lib/IR/ConstantFold.cpp
@@ -1941,7 +1941,7 @@ static bool isInBoundsIndices(ArrayRef<IndexTy> Idxs) {
static bool isIndexInRangeOfArrayType(uint64_t NumElements,
const ConstantInt *CI) {
// We cannot bounds check the index if it doesn't fit in an int64_t.
- if (CI->getValue().getMinSignedBits() > 64)
+ if (CI->getValue().getSignificantBits() > 64)
return false;
// A negative index or an index past the end of our sequential type is