[llvm] Use MaxStride instead of CommonStride to calculate MaxVF (PR #98142)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 03:56:35 PDT 2024


================
@@ -2233,7 +2229,7 @@ MemoryDepChecker::Dependence::DepType MemoryDepChecker::isDependent(
 
   // An update to MinDepDistBytes requires an update to MaxSafeVectorWidthInBits
   // since there is a backwards dependency.
-  uint64_t MaxVF = MinDepDistBytes / (TypeByteSize * *CommonStride);
+  uint64_t MaxVF = MinDepDistBytes / (TypeByteSize * MaxStride);
----------------
fhahn wrote:

Should be fine, as this maximizes the divisor, so conservatively reduces the VF

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


More information about the llvm-commits mailing list