[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:44 PST 2024


================
@@ -4123,7 +4138,8 @@ LoopVectorizationCostModel::computeMaxVF(ElementCount UserVF, unsigned UserIC) {
   // a bottom-test and a single exiting block. We'd have to handle the fact
   // that not every instruction executes on the last iteration.  This will
   // require a lane mask which varies through the vector loop body.  (TODO)
-  if (TheLoop->getExitingBlock() != TheLoop->getLoopLatch()) {
+  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