[llvm] [LV][EVL] Disable fixed-order recurrence idiom with EVL tail folding. (PR #122458)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 05:33:58 PST 2025


================
@@ -1447,9 +1447,11 @@ class LoopVectorizationCostModel {
     // Override forced styles if needed.
     // FIXME: use actual opcode/data type for analysis here.
     // FIXME: Investigate opportunity for fixed vector factor.
-    bool EVLIsLegal = UserIC <= 1 &&
-                      TTI.hasActiveVectorLength(0, nullptr, Align()) &&
-                      !EnableVPlanNativePath;
+    bool EVLIsLegal =
+        UserIC <= 1 && TTI.hasActiveVectorLength(0, nullptr, Align()) &&
+        !EnableVPlanNativePath &&
+        // FIXME: remove this once fixed-ordered recurrence is supported.
+        Legal->getFixedOrderRecurrences().empty();
----------------
alexey-bataev wrote:

Better do it here to avoid early (optimistic) tail folding decision and side-effects, caused by this too early decision

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


More information about the llvm-commits mailing list