[llvm] LAA: add missed swap when inverting src, sink (NFC) (PR #122254)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 03:25:03 PST 2025


================
@@ -1921,6 +1921,7 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
   if (StrideAPtr && *StrideAPtr < 0) {
     std::swap(Src, Sink);
     std::swap(AInst, BInst);
+    std::swap(ATy, BTy);
----------------
fhahn wrote:

I think the only way this could currently go wrong is in the code around line 1939 that gets start and end for the Src & Sink? Would it be possible to add a test case for it? (The other uses should be fine below as we only check if they match

https://github.com/llvm/llvm-project/pull/122254


More information about the llvm-commits mailing list