[llvm] [MemCpyOpt] Drop dead `memmove` calls on `memset`'d source data (PR #101930)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 03:36:38 PDT 2024


================
@@ -1854,12 +1855,53 @@ bool MemCpyOptPass::processMemCpy(MemCpyInst *M, BasicBlock::iterator &BBI) {
   return false;
 }
 
+/// Memmove calls with overlapping src/dest buffers that come after a memset may
+/// be removed.
+bool MemCpyOptPass::mayBeMemMoveMemSetDependency(MemMoveInst *M) {
----------------
antoniofrighetto wrote:

I think it's implicit in the fact that the memmove comes after the memset?

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


More information about the llvm-commits mailing list