[llvm] [LoopVectorize] Teach LoopVectorizationLegality about more early exits (PR #107004)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 01:47:16 PDT 2024


================
@@ -1070,6 +1070,51 @@ bool LoopVectorizationLegality::canVectorizeMemory() {
     return false;
   }
 
+  // For loops with uncountable early exiting blocks that are not the latch
+  // it's necessary to perform extra checks, since the vectoriser is currently
+  // only capable of handling simple search loops.
+  if (IsEarlyExitLoop) {
----------------
fhahn wrote:

IMO it would make sense to keep the checks together in `isVectorizableEarlyExitLoop` in particular with the extra checks recently added there

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


More information about the llvm-commits mailing list