[llvm] [GlobalISel] Fix volatile flag handling in memmove legalizer (PR #206025)

Ömer Sinan Ağacan via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 07:39:21 PDT 2026


================
@@ -10969,16 +10970,20 @@ LegalizerHelper::lowerMemcpy(MachineInstr &MI, Register Dst, Register Src,
   unsigned CurrOffset = 0;
   unsigned Size = KnownLen;
   for (auto CopyTy : MemOps) {
-    // Issuing an unaligned load / store pair  that overlaps with the previous
-    // pair. Adjust the offset accordingly.
-    if (CopyTy.getSizeInBytes() > Size)
-      CurrOffset -= CopyTy.getSizeInBytes() - Size;
+    unsigned TySize = CopyTy.getSizeInBytes();
----------------
osa1 wrote:

Makes sense. Merging this for now but I might continue refactoring to make use of `TypeSize` more widely in another PR.

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


More information about the llvm-commits mailing list