[llvm] 1f331e4 - [VPlan] Only use isAddressSCEVForCost in getAddressAccessSCEV (NFC)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 23 14:29:42 PST 2025
Author: Florian Hahn
Date: 2025-12-23T22:29:02Z
New Revision: 1f331e453fa9c328c165c739f61e17a2815ece82
URL: https://github.com/llvm/llvm-project/commit/1f331e453fa9c328c165c739f61e17a2815ece82
DIFF: https://github.com/llvm/llvm-project/commit/1f331e453fa9c328c165c739f61e17a2815ece82.diff
LOG: [VPlan] Only use isAddressSCEVForCost in getAddressAccessSCEV (NFC)
Follow-up to https://github.com/llvm/llvm-project/pull/171204 to only
rely on isAddressSCEVForCost in isAddressSCEVForCost, completely
aligning with the legacy cost model.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index b7deed8fc92ab..40b8ce999545c 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -3129,14 +3129,6 @@ bool VPReplicateRecipe::shouldPack() const {
static const SCEV *getAddressAccessSCEV(const VPValue *Ptr,
PredicatedScalarEvolution &PSE,
const Loop *L) {
- auto *PtrR = Ptr->getDefiningRecipe();
- if (!PtrR || !((isa<VPReplicateRecipe>(Ptr) &&
- cast<VPReplicateRecipe>(Ptr)->getOpcode() ==
- Instruction::GetElementPtr) ||
- isa<VPWidenGEPRecipe>(Ptr) ||
- match(Ptr, m_GetElementPtr(m_VPValue(), m_VPValue()))))
- return nullptr;
-
const SCEV *Addr = vputils::getSCEVExprForVPValue(Ptr, PSE, L);
if (isa<SCEVCouldNotCompute>(Addr))
return Addr;
More information about the llvm-commits
mailing list