[llvm] [LAA] Relax HasSameSize check on couldPrevertStoreLoadForward (PR #159537)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 01:52:35 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)) {
----------------
david-arm wrote:
But I don't believe that's true. This is how the code is constructed:
```
std::pair<uint64_t, uint64_t> TypeByteSize(ASz, BSz);
...
bool HasSameSize = AStoreSz == BStoreSz;
```
You're claiming that if `AStoreSz == BStoreSz`, then by definition `ASz == BSz`, which I think is an incorrect assertion.
https://github.com/llvm/llvm-project/pull/159537
More information about the llvm-commits
mailing list