[llvm] [MemCpyOpt] fix incorrect handling of lifetime markers (PR #143782)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 12 03:18:45 PDT 2025


================
@@ -1820,7 +1835,8 @@ bool MemCpyOptPass::processMemCpy(MemCpyInst *M, BasicBlock::iterator &BBI) {
       }
     }
 
-    if (hasUndefContents(MSSA, BAA, M->getSource(), MD, M->getLength())) {
+    if (hadUndefContentsBefore(MSSA, BAA, M->getSource(), AnyClobber, SrcLoc,
+                               M->getLength())) {
----------------
nikic wrote:

Isn't this going to recompute the clobbering access now, even though we already know it?

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


More information about the llvm-commits mailing list