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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 07:49:11 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() ||
----------------
david-arm wrote:

You're right, the latch should always be non-null.

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


More information about the llvm-commits mailing list