[VPlan] Use VPDef for VPWidenSelectRecipe.

This patch turns updates VPWidenSelectRecipe to manage the value
it defines using VPDef.

Reviewed By: gilr

Differential Revision: https://reviews.llvm.org/D90560
This commit is contained in:
Florian Hahn 2020-12-15 14:02:52 +00:00
parent 91445979be
commit 7186a3965a
No known key found for this signature in database
GPG Key ID: 61D7554B5CECDC0D
1 changed files with 6 additions and 3 deletions

View File

@ -885,7 +885,10 @@ public:
};
/// 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 @@ public:
template <typename IterT>
VPWidenSelectRecipe(SelectInst &I, iterator_range<IterT> 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;