[llvm] [LV] Consider EVL legality for TTI tail folding preference (PR #144790)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 20:41:55 PDT 2025


================
@@ -1364,16 +1364,14 @@ class LoopVectorizationCostModel {
       return;
     }
 
-    if (!ForceTailFoldingStyle.getNumOccurrences()) {
-      ChosenTailFoldingStyle = {
-          TTI.getPreferredTailFoldingStyle(/*IVUpdateMayOverflow=*/true),
-          TTI.getPreferredTailFoldingStyle(/*IVUpdateMayOverflow=*/false)};
-      return;
-    }
+    // Default to TTI preference, but allow command line override.
+    ChosenTailFoldingStyle = {
+        TTI.getPreferredTailFoldingStyle(/*IVUpdateMayOverflow=*/true),
+        TTI.getPreferredTailFoldingStyle(/*IVUpdateMayOverflow=*/false)};
----------------
preames wrote:

There is no way to test this with in tree backends.

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


More information about the llvm-commits mailing list