[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
================
@@ -9130,8 +9102,9 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
VPInstruction::ComputeReductionResult, {PhiR, NewExitingVPV}, ExitDL);
FinalReductionResult->insertBefore(*MiddleVPBB, IP);
OrigExitingVPV->replaceUsesWithIf(
- FinalReductionResult,
- [](VPUser &User, unsigned) { return isa<VPLiveOut>(&User); });
+ FinalReductionResult, [](VPUser &User, unsigned) {
+ return isa<VPLiveOut>(&User) || isa<VPScalarStoreRecipe>(&User);
----------------
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