Skip to content

Commit

Permalink
LAA: add missed swap when inverting src, sink (NFC)
Browse files Browse the repository at this point in the history
We miss swapping the types of the source and sink when the source and
sink are inverted, leaving a footgun behind. Fix this.
  • Loading branch information
artagnon committed Jan 9, 2025
1 parent 360a03c commit 5434156
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llvm/lib/Analysis/LoopAccessAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1921,6 +1921,7 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
if (StrideAPtr && *StrideAPtr < 0) {
std::swap(Src, Sink);
std::swap(AInst, BInst);
std::swap(ATy, BTy);
std::swap(StrideAPtr, StrideBPtr);
}

Expand Down

0 comments on commit 5434156

Please sign in to comment.