[llvm] [VectorUtils] Collect predicates separately in collectConstStrideAccesses. (PR #200807)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 03:18:30 PDT 2026


================
@@ -886,8 +886,12 @@ replaceSymbolicStrideSCEV(PredicatedScalarEvolution &PSE,
 ///
 /// If necessary this method will version the stride of the pointer according
 /// to \p PtrToStride and therefore add further predicates to \p PSE.
-/// The \p Assume parameter indicates if we are allowed to make additional
-/// run-time assumptions.
+///
+/// If \p Predicates is non-null, the no-wrap SCEV predicates needed to enable
+/// the stride analysis are appended to it rather than added to \p PSE, letting
+/// the caller discard them if the result turns out to be unused. (Stride
+/// versioning may still add predicates to \p PSE directly.) If \p Predicates is
----------------
artagnon wrote:

> Stride versioning may still add predicates to \p PSE directly.

Hm, would it be too hard to fix this? The API is a bit surprising at the moment?

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


More information about the llvm-commits mailing list