[llvm] 8b8b0f1 - [Scalar] Remove an unnecessary cast (NFC) (#150474)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 15:50:04 PDT 2025
Author: Kazu Hirata
Date: 2025-07-24T15:50:00-07:00
New Revision: 8b8b0f197fc66a3495722eca15cd807f5aa1769a
URL: https://github.com/llvm/llvm-project/commit/8b8b0f197fc66a3495722eca15cd807f5aa1769a
DIFF: https://github.com/llvm/llvm-project/commit/8b8b0f197fc66a3495722eca15cd807f5aa1769a.diff
LOG: [Scalar] Remove an unnecessary cast (NFC) (#150474)
getOperand() already returns Value *.
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 9e318b04c2c99..e3ef9d8680b53 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;
}
More information about the llvm-commits
mailing list