[llvm] [VPlan] Dispatch to multiple exit blocks via middle blocks. (PR #112138)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 22 03:59:52 PDT 2024


================
@@ -1514,6 +1522,27 @@ bool LoopVectorizationLegality::canVectorizeWithIfConvert() {
   return true;
 }
 
+bool LoopVectorizationLegality::canVectorizeEarlyExit() const {
----------------
david-arm wrote:

It feels a little odd to have both `canVectorizeEarlyExit` and `isVectorizableEarlyExitLoop` in the same class. Would it make sense to move the hints check into `isVectorizableEarlyExitLoop` to bypass legality checks? You could even get the benefit of existing code to build up a list of countable and uncountable exits that can be used later on when splitting the middle.block.

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


More information about the llvm-commits mailing list