@@ -2503,10 +2503,7 @@ class VPReplicateRecipe : public VPRecipeWithIRFlags {
25032503class VPBranchOnMaskRecipe : public VPRecipeBase {
25042504public:
25052505 VPBranchOnMaskRecipe (VPValue *BlockInMask)
2506- : VPRecipeBase(VPDef::VPBranchOnMaskSC, {}) {
2507- if (BlockInMask) // nullptr means all-one mask.
2508- addOperand (BlockInMask);
2509- }
2506+ : VPRecipeBase(VPDef::VPBranchOnMaskSC, {BlockInMask}) {}
25102507
25112508 VPBranchOnMaskRecipe *clone () override {
25122509 return new VPBranchOnMaskRecipe (getOperand (0 ));
@@ -2527,21 +2524,10 @@ class VPBranchOnMaskRecipe : public VPRecipeBase {
25272524 void print (raw_ostream &O, const Twine &Indent,
25282525 VPSlotTracker &SlotTracker) const override {
25292526 O << Indent << " BRANCH-ON-MASK " ;
2530- if (VPValue *Mask = getMask ())
2531- Mask->printAsOperand (O, SlotTracker);
2532- else
2533- O << " All-One" ;
2527+ printOperands (O, SlotTracker);
25342528 }
25352529#endif
25362530
2537- // / Return the mask used by this recipe. Note that a full mask is represented
2538- // / by a nullptr.
2539- VPValue *getMask () const {
2540- assert (getNumOperands () <= 1 && " should have either 0 or 1 operands" );
2541- // Mask is optional.
2542- return getNumOperands () == 1 ? getOperand (0 ) : nullptr ;
2543- }
2544-
25452531 // / Returns true if the recipe uses scalars of operand \p Op.
25462532 bool usesScalars (const VPValue *Op) const override {
25472533 assert (is_contained (operands (), Op) &&
0 commit comments