[llvm] 093c738 - [PowerPC] Remove a redundant cast (NFC) (#165834)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 31 13:01:27 PDT 2025
Author: Kazu Hirata
Date: 2025-10-31T13:01:23-07:00
New Revision: 093c738d79a2391b0d78574b3b62cd55b733f2d7
URL: https://github.com/llvm/llvm-project/commit/093c738d79a2391b0d78574b3b62cd55b733f2d7
DIFF: https://github.com/llvm/llvm-project/commit/093c738d79a2391b0d78574b3b62cd55b733f2d7.diff
LOG: [PowerPC] Remove a redundant cast (NFC) (#165834)
PtrValue is already of type Value *.
Added:
Modified:
llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp b/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
index 3640d2545b5ac..70df59d01d6c7 100644
--- a/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
+++ b/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
@@ -1316,7 +1316,7 @@ bool PPCLoopInstrFormPrep::runOnLoop(Loop *L) {
// useless and possible to break some original well-form addressing mode
// to make this pre-inc prep for it.
if (PointerElementType->isIntegerTy(64)) {
- const SCEV *LSCEV = SE->getSCEVAtScope(const_cast<Value *>(PtrValue), L);
+ const SCEV *LSCEV = SE->getSCEVAtScope(PtrValue, L);
const SCEVAddRecExpr *LARSCEV = dyn_cast<SCEVAddRecExpr>(LSCEV);
if (!LARSCEV || LARSCEV->getLoop() != L)
return false;
More information about the llvm-commits
mailing list