[llvm] [LAA] Relax HasSameSize check on couldPrevertStoreLoadForward (PR #159537)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 02:30:13 PDT 2026
================
@@ -2274,10 +2277,9 @@ MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx,
// Attempt to prove strided accesses independent.
if (APDist) {
- // If the distance between accesses and their strides are known constants,
- // check whether the accesses interlace each other.
- if (ConstDist > 0 && CommonStride && CommonStride > 1 && HasSameSize &&
- areStridedAccessesIndependent(ConstDist, *CommonStride, TypeByteSize)) {
+ if (ConstDist && CommonStride && CommonStride > 1 && HasSameSize &&
+ areStridedAccessesIndependent(ConstDist, *CommonStride,
+ TypeByteSize.first)) {
----------------
artagnon wrote:
It's not equivalent, but the old code had:
```cpp
uint64_t TypeByteSize = (AStoreSz == BStoreSz) ? BSz : 0;
```
... it should be TypeByteSize.second though, thanks!
https://github.com/llvm/llvm-project/pull/159537
More information about the llvm-commits
mailing list