[llvm] [LAA] Prepare to handle diff type sizes v2 (PR #161238)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 1 06:29:51 PDT 2025
================
@@ -2175,32 +2194,22 @@ MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx,
uint64_t ConstDist =
match(Dist, m_scev_APInt(APDist)) ? APDist->abs().getZExtValue() : 0;
- // 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)) {
- LLVM_DEBUG(dbgs() << "LAA: Strided accesses are independent\n");
- return Dependence::NoDep;
- }
- } else {
- if (!LoopGuards)
- LoopGuards.emplace(
- ScalarEvolution::LoopGuards::collect(InnermostLoop, SE));
- Dist = SE.applyLoopGuards(Dist, *LoopGuards);
+ // Attempt to prove strided accesses independent. If the distance between
+ // accesses and their strides are known constants, check whether the accesses
+ // interlace each other.
+ if (ConstDist && CommonStride && CommonStride > 1 && HasSameSize &&
+ areStridedAccessesIndependent(ConstDist, *CommonStride,
+ TypeByteSize.first)) {
----------------
artagnon wrote:
I initially had changes to areStridedAccessesIndependent, but @fhahn requested a revert of those changes?
https://github.com/llvm/llvm-project/pull/161238
More information about the llvm-commits
mailing list