[llvm] [LoopVectorize] Enable vectorisation of early exit loops with live-outs (PR #120567)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 07:21:56 PST 2025
================
@@ -407,6 +407,11 @@ class LoopVectorizationLegality {
/// Returns the destination of an uncountable early exiting block.
BasicBlock *getUncountableEarlyExitBlock() const {
+ if (!HasUncountableEarlyExit) {
----------------
huntergr-arm wrote:
Is there a reason to have a separate `HasUncountableEarlyExit` variable instead of just checking whether the list of uncountable exit(ing) blocks isn't empty? It just seems that having a single source of truth is better than repeatedly asserting that they agree.
It may also be better to store pairs of (Exiting,Exit) blocks instead of two separate vectors.
https://github.com/llvm/llvm-project/pull/120567
More information about the llvm-commits
mailing list