[llvm] [VPlan] Implement interleaving as VPlan-to-VPlan transform. (PR #95842)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 09:05:07 PDT 2024


================
@@ -1677,15 +1683,17 @@ class VPVectorPointerRecipe : public VPRecipeWithIRFlags {
   bool onlyFirstPartUsed(const VPValue *Op) const override {
     assert(is_contained(operands(), Op) &&
            "Op must be an operand of the recipe");
-    assert(getNumOperands() == 1 && "must have a single operand");
-    return true;
+    return Op == getOperand(0);
   }
 
   VPVectorPointerRecipe *clone() override {
     return new VPVectorPointerRecipe(getOperand(0), IndexedTy, IsReverse,
                                      isInBounds(), getDebugLoc());
   }
 
+  /// Return the part associated with this vector pointer.
+  unsigned getPartForRecipe() const;
----------------
fhahn wrote:

Updated name to `getUnrollPart`, updated comment, thanks!

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


More information about the llvm-commits mailing list