[llvm] [LV, VP]VP intrinsics support for the Loop Vectorizer + adding new tail-folding mode using EVL. (PR #76172)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 13:40:44 PDT 2024


================
@@ -2445,6 +2452,44 @@ class VPActiveLaneMaskPHIRecipe : public VPHeaderPHIRecipe {
 #endif
 };
 
+/// A recipe for generating the phi node for the current index of elements,
+/// adjusted in accordance with EVL value. It starts at StartIV value and gets
+/// incremented by EVL in each iteration of the vector loop.
+class VPEVLBasedIVPHIRecipe : public VPHeaderPHIRecipe {
+public:
+  VPEVLBasedIVPHIRecipe(VPValue *StartMask, DebugLoc DL)
+      : VPHeaderPHIRecipe(VPDef::VPEVLBasedIVPHISC, nullptr, StartMask, DL) {}
+
+  ~VPEVLBasedIVPHIRecipe() override = default;
+
+  VPEVLBasedIVPHIRecipe *clone() override {
+    return new VPEVLBasedIVPHIRecipe(getOperand(0), getDebugLoc());
----------------
alexey-bataev wrote:

Must be defined, otherwise the class is considered an abstract.

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


More information about the llvm-commits mailing list