[llvm] [LAA] Pass maximum stride to isSafeDependenceDistance. (PR #90036)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 30 02:50:33 PDT 2024
================
@@ -2046,14 +2046,15 @@ MemoryDepChecker::Dependence::DepType MemoryDepChecker::isDependent(
ScalarEvolution &SE = *PSE.getSE();
auto &DL = InnermostLoop->getHeader()->getModule()->getDataLayout();
+ uint64_t MaxStride = std::max(StrideA, StrideB);
- // If the distance between the acecsses is larger than their absolute stride
- // multiplied by the backedge taken count, the accesses are independet, i.e.
- // they are far enough appart that accesses won't access the same location
- // across all loop ierations.
- if (HasSameSize && CommonStride &&
+ // If the distance between the acecsses is larger than their maximum absolute
+ // stride multiplied by the backedge taken count, the accesses are independet,
+ // i.e. they are far enough appart that accesses won't access the same
+ // location across all loop ierations.
+ if (HasSameSize &&
----------------
Meinersbur wrote:
I see. Thanks for pointing me there.
https://github.com/llvm/llvm-project/pull/90036
More information about the llvm-commits
mailing list