[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 05:52:45 PST 2025


================
@@ -4109,7 +4110,8 @@ LoopVectorizationCostModel::computeMaxVF(ElementCount UserVF, unsigned UserIC) {
   // found modulo the vectorization factor is not zero, try to fold the tail
   // by masking.
   // FIXME: look for a smaller MaxVF that does divide TC rather than masking.
-  setTailFoldingStyles(MaxFactors.ScalableVF.isScalable(), UserIC);
+  bool ContainsScalableVF = MaxFactors.ScalableVF.isNonZero();
----------------
alexey-bataev wrote:

`bool ContainsScalableVF = MaxFactors.ScalableVF && MaxFactors.ScalableVF.isScalable();`

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


More information about the llvm-commits mailing list