[llvm] dabd634 - [LVI] Remove unused get of Range metadata (#94914)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 10 05:39:42 PDT 2024
Author: Andreas Jonson
Date: 2024-06-10T14:39:39+02:00
New Revision: dabd6349f7bbcc2c1fc1354f97a3475a9dcc9e2a
URL: https://github.com/llvm/llvm-project/commit/dabd6349f7bbcc2c1fc1354f97a3475a9dcc9e2a
DIFF: https://github.com/llvm/llvm-project/commit/dabd6349f7bbcc2c1fc1354f97a3475a9dcc9e2a.diff
LOG: [LVI] Remove unused get of Range metadata (#94914)
There is no test for this code and it also do not change the result of
https://github.com/dtcxzyw/llvm-opt-benchmark when I run it locally.
I have not been able to make a test for this and do not know how to
handle the range attribute for this so maybe it shall be removed?
Added:
Modified:
llvm/lib/Analysis/LazyValueInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 6cded828c25f4..8b6e56ce8113d 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -1116,9 +1116,6 @@ LazyValueInfoImpl::getValueFromSimpleICmpCondition(CmpInst::Predicate Pred,
if (!R)
return std::nullopt;
RHSRange = toConstantRange(*R, RHS->getType());
- } else if (Instruction *I = dyn_cast<Instruction>(RHS)) {
- if (auto *Ranges = I->getMetadata(LLVMContext::MD_range))
- RHSRange = getConstantRangeFromMetadata(*Ranges);
}
ConstantRange TrueValues =
More information about the llvm-commits
mailing list