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 @@ -885,7 +885,10 @@ }; /// A recipe for widening select instructions. -class VPWidenSelectRecipe : public VPRecipeBase, public VPValue, public VPUser { +class VPWidenSelectRecipe : public VPRecipeBase, + public VPDef, + public VPUser, + public VPValue { /// Is the condition of the select loop invariant? bool InvariantCond; @@ -894,8 +897,8 @@ template VPWidenSelectRecipe(SelectInst &I, iterator_range Operands, bool InvariantCond) - : VPRecipeBase(VPRecipeBase::VPWidenSelectSC), - VPValue(VPValue::VPVWidenSelectSC, &I), VPUser(Operands), + : VPRecipeBase(VPRecipeBase::VPWidenSelectSC), VPUser(Operands), + VPValue(VPValue::VPVWidenSelectSC, &I, this), InvariantCond(InvariantCond) {} ~VPWidenSelectRecipe() override = default;