[llvm] [NFC][LAA] Minor stylistic/comments improvements (PR #185510)
Andrei Elovikov via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 12 09:56:22 PDT 2026
================
@@ -2575,12 +2577,13 @@ bool LoopAccessInfo::analyzeLoop(AAResults *AA, const LoopInfo *LI,
HasConvergentOp = true;
}
- // With both a non-vectorizable memory instruction and a convergent
- // operation, found in this loop, no reason to continue the search.
+ // Unsafe to vectorize and we already found a convergent operation, can
+ // early return now.
----------------
eas wrote:
I don't believe that's true, imagine loop trip count varying between threads, something like `4 + 4 * (%thread_id % 2)` (in RT, not statically visible). If we vectorize that with VF=8 and a remainder then we'd split first 4 "scalar" iterations into two different loops - vector for even threads and scalar for odd. That is illegal to split. a convergent operation like that, IIUC.
I actually wanted to add such a comment/test but we drop out in legality for an unknown intrinsic so I couldn't craft a test.
https://github.com/llvm/llvm-project/pull/185510
More information about the llvm-commits
mailing list