[llvm] LAA: scale strides using type-size (NFC) (PR #124529)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 06:36:23 PST 2025


================
@@ -1990,25 +1986,32 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
     return MemoryDepChecker::Dependence::Unknown;
   }
 
-  uint64_t TypeByteSize = DL.getTypeAllocSize(ATy);
-  bool HasSameSize =
-      DL.getTypeStoreSizeInBits(ATy) == DL.getTypeStoreSizeInBits(BTy);
-  if (!HasSameSize)
-    TypeByteSize = 0;
+  TypeSize AStoreSz = DL.getTypeStoreSize(ATy),
+           BStoreSz = DL.getTypeStoreSize(BTy);
+
+  // Fail early if either store size is scalable.
+  if (AStoreSz.isScalable() || BStoreSz.isScalable())
----------------
artagnon wrote:

It's actually dead code, since getPtrStride already checks for scalable vectors. Stripped now, thanks!

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


More information about the llvm-commits mailing list