[llvm] [VPlan] Remove unused first mask op from VPBlendRecipe. (PR #87770)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 16:41:23 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");
----------------
ayalz wrote:
```suggestion
((Operands.size() + 1) % 2 == 0)) && "Expected an odd number of operands");
```
https://github.com/llvm/llvm-project/pull/87770
More information about the llvm-commits
mailing list