[llvm] [VPlan] Extend getSCEVForVPV, use to compute VPReplicateRecipe cost. (PR #161276)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 3 06:45:17 PDT 2025


================
@@ -3110,26 +3110,28 @@ bool VPReplicateRecipe::shouldPack() const {
   });
 }
 
-/// Returns true if \p Ptr is a pointer computation for which the legacy cost
-/// model computes a SCEV expression when computing the address cost.
-static bool shouldUseAddressAccessSCEV(const VPValue *Ptr) {
+/// Returns a SCEV expression for \p Ptr if it is a pointer computation for
+/// which the legacy cost model computes a SCEV expression when computing the
+/// address cost. Otherwise return nullptr.
----------------
artagnon wrote:

Could add something about the difference between SCEVUnknown and nullptr wrt the cost-model?

https://github.com/llvm/llvm-project/pull/161276


More information about the llvm-commits mailing list