[llvm] [VPlan] Remove unused first mask op from VPBlendRecipe. (PR #87770)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 03:00:52 PDT 2024


================
@@ -1932,12 +1932,12 @@ class VPReductionPHIRecipe : public VPHeaderPHIRecipe {
 class VPBlendRecipe : public VPSingleDefRecipe {
 public:
   /// The blend operation is a User of the incoming values and of their
-  /// respective masks, ordered [I0, M0, I1, M1, ...]. Note that a single value
-  /// might be incoming with a full mask for which there is no VPValue.
+  /// respective masks, ordered [I0, I1, M1, ...]. Note that the first incoming
+  /// value does not have a mask associated.
   VPBlendRecipe(PHINode *Phi, ArrayRef<VPValue *> Operands)
       : VPSingleDefRecipe(VPDef::VPBlendSC, Operands, Phi, Phi->getDebugLoc()) {
     assert(Operands.size() > 0 &&
-           ((Operands.size() == 1) || (Operands.size() % 2 == 0)) &&
+           ((Operands.size() == 1) || ((Operands.size() + 1) % 2 == 0)) &&
            "Expected either a single incoming value or a positive even number "
            "of operands");
----------------
fhahn wrote:

Updated, thanks!

https://github.com/llvm/llvm-project/pull/87770


More information about the llvm-commits mailing list