[llvm] [LAA] Speculate the interleave factor for strided pointer inductions (PR #216036)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 15 01:46:45 PDT 2026


================
@@ -153,13 +152,89 @@ bool VectorizerParams::isInterleaveForced() {
   return ::VectorizationInterleave.getNumOccurrences() > 0;
 }
 
+std::optional<unsigned>
+llvm::getSpeculatedInterleaveStride(const Loop &L, ScalarEvolution &SE,
+                                    const SCEV *Stride) {
+  // Casts on the stride do not change the value being guessed.
+  match(Stride, m_scev_IgnoreCasts(m_SCEV(Stride)));
----------------
artagnon wrote:

StrideSCEV is guaranteed to be SCEVUnknown in the caller.

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


More information about the llvm-commits mailing list