[llvm] Reapply "[VPlan] Remove unused VPExpandSCEVRecipe before expansion" (PR #187233)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 02:51:40 PDT 2026


================
@@ -9236,8 +9181,10 @@ static SmallVector<Instruction *> preparePlanForEpilogueVectorLoop(
     auto *ExpandR = dyn_cast<VPExpandSCEVRecipe>(&R);
     if (!ExpandR)
       continue;
-    VPValue *ExpandedVal =
-        Plan.getOrAddLiveIn(ExpandedSCEVs.lookup(ExpandR->getSCEV()));
+    Value *ExpandedSCEV = ExpandedSCEVs.lookup(ExpandR->getSCEV());
+    if (!ExpandedSCEV)
+      continue;
----------------
fhahn wrote:

Sure this would be something to check, would be good to have a test

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


More information about the llvm-commits mailing list