[llvm] [LV][EVL] Fix the check for legality of folding with EVL. (PR #125678)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 08:00:47 PST 2025


================
@@ -1454,9 +1454,10 @@ class LoopVectorizationCostModel {
     // FIXME: Investigate opportunity for fixed vector factor.
     // FIXME: support fixed-order recurrences by fixing splice of non VFxUF
     // penultimate EVL.
-    bool EVLIsLegal =
-        UserIC <= 1 && TTI.hasActiveVectorLength(0, nullptr, Align()) &&
-        !EnableVPlanNativePath && Legal->getFixedOrderRecurrences().empty();
+    bool EVLIsLegal = UserIC <= 1 && IsScalableVF &&
+                      TTI.hasActiveVectorLength(0, nullptr, Align()) &&
----------------
alexey-bataev wrote:

> In theory, is there a possible scenario for targets that support EVL for fixed width vectors? If that's the case, eventually it would make sense to ask TTI if the target supports EVL for a specific vector type?

We discussed it couple years ago and claimed that currently EVL do not supports it. Added a check here but then just accidentally removed it.



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


More information about the llvm-commits mailing list