Skip to content

Commit 57a95ed

Browse files
committed
Mark PartialReductionRecipe as not having side effects
1 parent 6651bbb commit 57a95ed

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ bool VPRecipeBase::mayHaveSideEffects() const {
159159
case VPWidenIntrinsicSC:
160160
return cast<VPWidenIntrinsicRecipe>(this)->mayHaveSideEffects();
161161
case VPBlendSC:
162+
case VPPartialReductionSC:
162163
case VPReductionEVLSC:
163164
case VPReductionSC:
164165
case VPScalarIVStepsSC:

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2461,7 +2461,6 @@ tryToCreateAbstractPartialReductionRecipe(VPPartialReductionRecipe *PRed) {
24612461
Ext0->getResultType());
24622462
AbstractR->insertBefore(PRed);
24632463
PRed->replaceAllUsesWith(AbstractR);
2464-
PRed->eraseFromParent();
24652464
}
24662465

24672466
void VPlanTransforms::convertToAbstractRecipes(VPlan &Plan, VPCostContext &Ctx,

0 commit comments

Comments
 (0)