[llvm] [LV] Initial support for stores in early exit loops (PR #137774)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Wed May 14 08:30:07 PDT 2025
================
@@ -1708,16 +1755,31 @@ bool LoopVectorizationLegality::isVectorizableEarlyExitLoop() {
}
};
+ bool HasStore = false;
for (auto *BB : TheLoop->blocks())
for (auto &I : *BB) {
+ if (StoreInst *SI = dyn_cast<StoreInst>(&I)) {
----------------
huntergr-arm wrote:
No. Since this prototype bails out to a scalar loop if the next vector iteration would exit partway through, it doesn't matter where the store is in the loop.
If/when we do tail-folding for these loops, we will need to generate different masks for state-changing operations before or after an exit.
https://github.com/llvm/llvm-project/pull/137774
More information about the llvm-commits
mailing list