[llvm] [VPlan] Add ReductionStartVector VPInstruction. (PR #142290)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 5 14:07:15 PDT 2025
================
@@ -1153,6 +1153,16 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
return;
}
}
+ // Simplify redundant ReductionStartVector recipes after unrolling.
+ VPValue *StartV;
+ if (match(Def, m_VPInstruction<VPInstruction::ReductionStartVector>(
+ m_VPValue(StartV), m_VPValue(), m_VPValue()))) {
+ Def->replaceUsesWithIf(StartV, [Def](const VPUser &U, unsigned Idx) {
+ auto *PhiR = dyn_cast<VPReductionPHIRecipe>(&U);
+ return PhiR && Def == PhiR->getOperand(Idx) && PhiR->isInLoop();
----------------
fhahn wrote:
Yep that's not needed in the latest version, removed thanks!
https://github.com/llvm/llvm-project/pull/142290
More information about the llvm-commits
mailing list