[llvm] [MemCpyOpt] Don't perform stack-move opt for out-of-bounds copy (PR #217607)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 22 05:30:09 PDT 2026


================
@@ -1572,6 +1572,13 @@ bool MemCpyOptPass::performStackMoveOptzn(Instruction *Load, Instruction *Store,
     return false;
   }
 
+  if (*SrcOffset) {
----------------
dtcxzyw wrote:

Even if SrcOffset is zero, the access size may still exceed the size of src alloca.


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


More information about the llvm-commits mailing list