[llvm] [LAA] Prepare to handle diff type sizes v2 (NFC) (PR #161238)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 23:51:59 PDT 2026


================
@@ -2211,8 +2209,24 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
     return Dependence::Unknown;
   }
 
+  // When the distance is possibly zero, we're reading/writing the same memory
+  // location: if the store sizes are not equal, fail with an unknown
+  // dependence.
+  TypeSize AStoreSz = DL.getTypeStoreSize(ATy);
+  TypeSize BStoreSz = DL.getTypeStoreSize(BTy);
+  if (AStoreSz != BStoreSz && SE.isKnownNonPositive(Dist) &&
+      SE.isKnownNonNegative(Dist)) {
----------------
artagnon wrote:

Ah, I don't think you're looking at the latest changes, but at one commit specifically? The change should not be present in the PR?

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


More information about the llvm-commits mailing list