[llvm] [VPlan] Remove unused first mask op from VPBlendRecipe. (PR #87770)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 9 05:08:22 PDT 2024
================
@@ -1932,14 +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, I2, M2, ...]. 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)) &&
- "Expected either a single incoming value or a positive even number "
- "of operands");
+ assert((Operands.size() + 1) % 2 == 0 &&
----------------
ayalz wrote:
nit: is this better than asserting that the number of operands is odd by `Operands.size() % 2 == 1`?
https://github.com/llvm/llvm-project/pull/87770
More information about the llvm-commits
mailing list