[llvm] [VPlan] Extend getSCEVForVPV, use to compute VPReplicateRecipe cost. (PR #161276)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 3 06:08:26 PDT 2025
================
@@ -3257,9 +3253,12 @@ InstructionCost VPReplicateRecipe::computeCost(ElementCount VF,
Type *PtrTy = isSingleScalar() ? ScalarPtrTy : toVectorTy(ScalarPtrTy, VF);
+ const SCEV *PtrSCEV = getAddressAccessSCEV(PtrOp, Ctx.SE, Ctx.L);
+ if (PtrSCEV && isa<SCEVCouldNotCompute>(PtrSCEV))
----------------
fhahn wrote:
See the comment above about distinguishing nullptr and SCEVCouldNotCompute. I updated the code to use `isa_and_nonnull`.
https://github.com/llvm/llvm-project/pull/161276
More information about the llvm-commits
mailing list