[llvm] [LV][NFC] Clean up tail-folding check for early-exit loops (PR #133931)

Shih-Po Hung via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 3 08:25:48 PDT 2025


================
@@ -4049,7 +4033,9 @@ LoopVectorizationCostModel::computeMaxVF(ElementCount UserVF, unsigned UserIC) {
     return Rem->isZero();
   };
 
-  if (MaxPowerOf2RuntimeVF > 0u) {
+  bool HasSingleLatchExit =
----------------
arcbbb wrote:

Thanks! It does streamline the code.
I had been thinking that enabling the EVL transform would require going through setTailFoldingStyles(). But you're right — for loops where the trip count is known to be a multiple of the VF, using a non-predicated form should work well.

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


More information about the llvm-commits mailing list