@@ -2503,10 +2503,7 @@ class VPReplicateRecipe : public VPRecipeWithIRFlags {
2503
2503
class VPBranchOnMaskRecipe : public VPRecipeBase {
2504
2504
public:
2505
2505
VPBranchOnMaskRecipe (VPValue *BlockInMask)
2506
- : VPRecipeBase(VPDef::VPBranchOnMaskSC, {}) {
2507
- if (BlockInMask) // nullptr means all-one mask.
2508
- addOperand (BlockInMask);
2509
- }
2506
+ : VPRecipeBase(VPDef::VPBranchOnMaskSC, {BlockInMask}) {}
2510
2507
2511
2508
VPBranchOnMaskRecipe *clone () override {
2512
2509
return new VPBranchOnMaskRecipe (getOperand (0 ));
@@ -2527,21 +2524,10 @@ class VPBranchOnMaskRecipe : public VPRecipeBase {
2527
2524
void print (raw_ostream &O, const Twine &Indent,
2528
2525
VPSlotTracker &SlotTracker) const override {
2529
2526
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);
2534
2528
}
2535
2529
#endif
2536
2530
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
-
2545
2531
// / Returns true if the recipe uses scalars of operand \p Op.
2546
2532
bool usesScalars (const VPValue *Op) const override {
2547
2533
assert (is_contained (operands (), Op) &&
0 commit comments