[llvm] [LV] Follow up to uncountable exit with side effects vectorization (PR #201589)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 06:40:50 PDT 2026
================
@@ -4210,6 +4210,31 @@ struct EarlyExitInfo {
/// Update \p Plan to mask memory operations in the loop based on whether the
/// early exit is taken or not.
+//
+// We're currently expecting to find a loop with properties similar to the
+// following C code:
+//
+// #define N 10000
+// int cond[N];
+// int src[N];
+// int dst[N];
+//
+// void foo(int threshold) {
+// for (int i=0; i<N; ++i) {
+// if (cond[i] > threshold)
+// break;
+// dst[i] = src[i] + 42;
+// }
+// }
+//
+// The loop must have a single unconditional load contributing to the
+// uncountable exit comparison, and the other term must be loop-invariant.
+// There must also be a counted exit. Other memory operations in the loop can
+// take place before or after the uncountable exit, but must also be
+// unconditional. All potential accesses to the memory used for the load for the
+// exit condition must be guaranteed to be dereferenceable. Any stores within
+// the loop must not alias with any other memory operations.
----------------
huntergr-arm wrote:
done.
https://github.com/llvm/llvm-project/pull/201589
More information about the llvm-commits
mailing list