[llvm] [DA] Dependence analysis does not handle array accesses of different sizes (PR #116630)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 06:58:24 PST 2025


================
@@ -3601,14 +3601,10 @@ DependenceInfo::depends(Instruction *Src, Instruction *Dst,
     return std::make_unique<Dependence>(Src, Dst);
   }
 
-  assert(isLoadOrStore(Src) && "instruction is not load or store");
-  assert(isLoadOrStore(Dst) && "instruction is not load or store");
-  Value *SrcPtr = getLoadStorePointerOperand(Src);
-  Value *DstPtr = getLoadStorePointerOperand(Dst);
+  const MemoryLocation &LocA = MemoryLocation::get(Dst);
+  const MemoryLocation &LocB = MemoryLocation::get(Src);
----------------
nikic wrote:

LocA, LocB -> LocSrc, LocDst or SrcLoc, DstLoc maybe?

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


More information about the llvm-commits mailing list