aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-07-24 15:50:00 -0700
committerGitHub <noreply@github.com>2025-07-24 15:50:00 -0700
commit8b8b0f197fc66a3495722eca15cd807f5aa1769a (patch)
treef193d23cd03a41f8b6f627d6121f8b66a3197521 /llvm/lib
parenta268ed8557999d9bf06090e53a59642ad6ee2fbe (diff)
downloadllvm-8b8b0f197fc66a3495722eca15cd807f5aa1769a.zip
llvm-8b8b0f197fc66a3495722eca15cd807f5aa1769a.tar.gz
llvm-8b8b0f197fc66a3495722eca15cd807f5aa1769a.tar.bz2
[Scalar] Remove an unnecessary cast (NFC) (#150474)
getOperand() already returns Value *.
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 9e318b0..e3ef9d8 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -3785,7 +3785,7 @@ LSRInstance::CollectLoopInvariantFixupsAndFormulae() {
// Ignore icmp instructions which are already being analyzed.
if (const ICmpInst *ICI = dyn_cast<ICmpInst>(UserInst)) {
unsigned OtherIdx = !U.getOperandNo();
- Value *OtherOp = const_cast<Value *>(ICI->getOperand(OtherIdx));
+ Value *OtherOp = ICI->getOperand(OtherIdx);
if (SE.hasComputableLoopEvolution(SE.getSCEV(OtherOp), L))
continue;
}