[llvm] [LLVM][VPlan] Keep all VPBlend masks until VPlan transformation. (PR #104015)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 04:39:51 PDT 2024


================
@@ -2048,19 +2048,23 @@ class VPBlendRecipe : public VPSingleDefRecipe {
 
   VP_CLASSOF_IMPL(VPDef::VPBlendSC)
 
+  /// A normalized blend is one that has an odd number of operands, whereby the
+  /// first operand does not have an associated mask.
+  bool isNormalized() const { return getNumOperands() % 2; }
+
   /// Return the number of incoming values, taking into account that the first
   /// incoming value has no mask.
   unsigned getNumIncomingValues() const { return (getNumOperands() + 1) / 2; }
----------------
paulwalker-arm wrote:

Fair enough.  I've changed to the implementation and comment to aid clarity.

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


More information about the llvm-commits mailing list