[llvm] [LoopVectorize] Enable more early exit vectorisation tests (PR #117008)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 05:56:42 PST 2024


================
@@ -4753,7 +4769,9 @@ bool LoopVectorizationPlanner::isCandidateForEpilogueVectorization(
   // Epilogue vectorization code has not been auditted to ensure it handles
   // non-latch exits properly.  It may be fine, but it needs auditted and
   // tested.
-  if (OrigLoop->getExitingBlock() != OrigLoop->getLoopLatch())
+  // TODO: Add support for loops with an early exit.
+  if (Legal->hasUncountableEarlyExit() ||
----------------
fhahn wrote:

Is this needed? If there's an uncountable early exit, there won't be a single exiting block and the check below will be true (as there must be a latch)

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


More information about the llvm-commits mailing list