[llvm] [LVI] Remove unused get of Range metadata. (PR #94914)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 9 13:48:43 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-analysis
Author: Andreas Jonson (andjo403)
<details>
<summary>Changes</summary>
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?
CC @<!-- -->nikic
---
Full diff: https://github.com/llvm/llvm-project/pull/94914.diff
1 Files Affected:
- (modified) llvm/lib/Analysis/LazyValueInfo.cpp (-3)
``````````diff
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 =
``````````
</details>
https://github.com/llvm/llvm-project/pull/94914
More information about the llvm-commits
mailing list