[llvm] [SelectionDAG] Update MemOp to distinguish memmove from memcpy (PR #206005)

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 26 05:07:10 PDT 2026


=?utf-8?q?Ömer_Sinan_Ağacan?= <omeragacan at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/206005 at github.com>


================
@@ -168,19 +182,25 @@ struct MemOp {
     return DstAlign;
   }
   bool isFixedDstAlign() const { return !DstAlignCanChange; }
-  bool allowOverlap() const { return AllowOverlap; }
-  bool isMemset() const { return IsMemset; }
-  bool isMemcpy() const { return !IsMemset; }
-  bool isMemcpyWithFixedDstAlign() const {
-    return isMemcpy() && !DstAlignCanChange;
+  bool allowOverlap() const { return !IsVolatile; }
----------------
JonPsson1 wrote:

well, I can confirm that at least two more persons (including myself) was confused by this naming! This is because it naturally relates to the difference of memcpy/memmove which is very central here.

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


More information about the llvm-commits mailing list