[llvm] [LAA] Relax HasSameSize check on couldPrevertStoreLoadForward (PR #159537)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 01:34:06 PDT 2026


================
@@ -2415,14 +2417,15 @@ MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx,
 
   bool IsTrueDataDependence = (!AIsWrite && BIsWrite);
   if (IsTrueDataDependence && EnableForwardingConflictDetection && ConstDist &&
-      couldPreventStoreLoadForward(MinDistance, TypeByteSize, *CommonStride))
+      couldPreventStoreLoadForward(MinDistance, TypeByteSize.first,
+                                   *CommonStride))
     return Dependence::BackwardVectorizableButPreventsForwarding;
 
   uint64_t MaxVF = MinDepDistBytes / MaxStride;
   LLVM_DEBUG(dbgs() << "LAA: Positive min distance " << MinDistance
                     << " with max VF = " << MaxVF << '\n');
 
-  uint64_t MaxVFInBits = MaxVF * TypeByteSize * 8;
+  uint64_t MaxVFInBits = MaxVF * TypeByteSize.first * 8;
----------------
david-arm wrote:

It looks like you never use the second type alloc size in the pair. Is there any point in passing a pair around in this case?

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


More information about the llvm-commits mailing list