[llvm] [LV][VPlan] Introduce VPScalarStore recipe to handle scalar stores in exit block. (PR #93148)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 00:52:57 PDT 2024


================
@@ -8911,8 +8882,9 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
       for (VPUser *U : Cur->users()) {
         auto *UserRecipe = dyn_cast<VPSingleDefRecipe>(U);
         if (!UserRecipe) {
-          assert(isa<VPLiveOut>(U) &&
-                 "U must either be a VPSingleDef or VPLiveOut");
+          assert((isa<VPLiveOut>(U) || isa<VPScalarStoreRecipe>(U)) &&
----------------
fhahn wrote:

better to also assert that `VPScalarStoreRecipe` is outside the vector loop region?

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


More information about the llvm-commits mailing list