[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
Tue Mar 26 13:01:34 PDT 2024


================
@@ -1505,20 +1508,60 @@ class LoopVectorizationCostModel {
 
   /// Returns the TailFoldingStyle that is best for the current loop.
   TailFoldingStyle getTailFoldingStyle(bool IVUpdateMayOverflow = true) const {
-    return IVUpdateMayOverflow ? ChosenTailFoldingStyle.first
-                               : ChosenTailFoldingStyle.second;
+    if (!ChosenTailFoldingStyle.first) {
+      assert(!ChosenTailFoldingStyle.second &&
+             "Chosen tail folding style must not be set.");
+      return TailFoldingStyle::None;
+    }
----------------
alexey-bataev wrote:

Ubnfortunately, cannot do it directly in the patch, requires too many changes in the code and will definitely cause extra time for the review. Reverting it back.

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


More information about the llvm-commits mailing list