[llvm] [LAA] Be more precise on different store sizes (PR #122318)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 21 07:26:03 PDT 2025
================
@@ -2165,15 +2171,9 @@ MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx,
// Negative distances are not plausible dependencies.
if (SE.isKnownNonPositive(Dist)) {
- if (SE.isKnownNonNegative(Dist)) {
- if (HasSameSize) {
- // Write to the same location with the same size.
- return Dependence::Forward;
- }
- LLVM_DEBUG(dbgs() << "LAA: possibly zero dependence difference but "
- "different type sizes\n");
- return Dependence::Unknown;
- }
+ if (SE.isKnownNonNegative(Dist))
+ // Write to the same location with the same size.
+ return Dependence::Forward;
----------------
fhahn wrote:
```suggestion
if (SE.isKnownNonNegative(Dist)) {
// Write to the same location with the same size.
return Dependence::Forward;
}
```
nit: {} are recommended for all blocks more than one line IIRC
https://github.com/llvm/llvm-project/pull/122318
More information about the llvm-commits
mailing list