[llvm] [VPlan] Remove SCEVToExpansion mapping (NFC). (PR #164490)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 28 09:19:19 PDT 2025


================
@@ -32,8 +32,6 @@ bool vputils::onlyScalarValuesUsed(const VPValue *Def) {
 }
 
 VPValue *vputils::getOrCreateVPValueForSCEVExpr(VPlan &Plan, const SCEV *Expr) {
-  if (auto *Expanded = Plan.getSCEVExpansion(Expr))
-    return Expanded;
   VPValue *Expanded = nullptr;
   if (auto *E = dyn_cast<SCEVConstant>(Expr))
     Expanded = Plan.getOrAddLiveIn(E->getValue());
----------------
ayalz wrote:

Can now early-exit here, and below:
```suggestion
  if (auto *E = dyn_cast<SCEVConstant>(Expr))
    return Plan.getOrAddLiveIn(E->getValue());
```

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


More information about the llvm-commits mailing list