diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h --- a/llvm/lib/Transforms/Vectorize/VPlan.h +++ b/llvm/lib/Transforms/Vectorize/VPlan.h @@ -914,21 +914,25 @@ }; /// A recipe for handling GEP instructions. -class VPWidenGEPRecipe : public VPRecipeBase, public VPValue, public VPUser { +class VPWidenGEPRecipe : public VPRecipeBase, + public VPDef, + public VPUser, + public VPValue { bool IsPtrLoopInvariant; SmallBitVector IsIndexLoopInvariant; public: template VPWidenGEPRecipe(GetElementPtrInst *GEP, iterator_range Operands) - : VPRecipeBase(VPRecipeBase::VPWidenGEPSC), VPValue(VPWidenGEPSC, GEP), - VPUser(Operands), IsIndexLoopInvariant(GEP->getNumIndices(), false) {} + : VPRecipeBase(VPRecipeBase::VPWidenGEPSC), VPUser(Operands), + VPValue(VPWidenGEPSC, GEP, this), + IsIndexLoopInvariant(GEP->getNumIndices(), false) {} template VPWidenGEPRecipe(GetElementPtrInst *GEP, iterator_range Operands, Loop *OrigLoop) - : VPRecipeBase(VPRecipeBase::VPWidenGEPSC), - VPValue(VPValue::VPVWidenGEPSC, GEP), VPUser(Operands), + : VPRecipeBase(VPRecipeBase::VPWidenGEPSC), VPUser(Operands), + VPValue(VPValue::VPVWidenGEPSC, GEP, this), IsIndexLoopInvariant(GEP->getNumIndices(), false) { IsPtrLoopInvariant = OrigLoop->isLoopInvariant(GEP->getPointerOperand()); for (auto Index : enumerate(GEP->indices()))