Skip to content

Commit 6ec61b2

Browse files
committed
Mark PartialReductionRecipe as not having side effects
1 parent ed0bb64 commit 6ec61b2

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 VPExtendedReductionSC:

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2941,7 +2941,6 @@ tryToCreateAbstractPartialReductionRecipe(VPPartialReductionRecipe *PRed) {
29412941
Ext0->getResultType());
29422942
AbstractR->insertBefore(PRed);
29432943
PRed->replaceAllUsesWith(AbstractR);
2944-
PRed->eraseFromParent();
29452944
}
29462945

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

0 commit comments

Comments
 (0)