[llvm] [LV] Check Addr in getAddressAccessSCEV in terms of SCEV expressions. (PR #171204)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 15 00:35:03 PST 2025


================
@@ -42,6 +42,12 @@ VPValue *getOrCreateVPValueForSCEVExpr(VPlan &Plan, const SCEV *Expr);
 const SCEV *getSCEVExprForVPValue(const VPValue *V, ScalarEvolution &SE,
                                   const Loop *L = nullptr);
 
+/// Returns true if \p Addr is an address SCEV that can be passed to
+/// TTI::getAddressComputationCost, i.e. the address SCEV is loop invariant, an
+/// affine AddRec (i.e. induction ), or an add expression of such operands or a
----------------
fhahn wrote:

Yep, for now that is intentional. As the result must be a pointer SCEV expression, so it cannot be an extend, unless it is part of another expression

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


More information about the llvm-commits mailing list