[llvm] [MemCpyOpt] Require writable object during call slot optimization (PR #71542)

Kohei Asano via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 00:44:53 PST 2023


================
@@ -6,7 +6,7 @@ declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture readonly, i64,
 declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i1) nounwind
 
 ; all bytes of %dst that are touch by the memset are dereferenceable
-define void @must_remove_memcpy(ptr noalias nocapture dereferenceable(4096) %dst) nofree nosync {
+define void @must_remove_memcpy(ptr noalias nocapture writable dereferenceable(4096) %dst) nofree nosync {
----------------
khei4 wrote:

If `dereferenceable(N)` + `writable` means no-data race to write these pointers, are `noalias`s no longer required for those tests? Seems like the current implementation seems so.

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


More information about the llvm-commits mailing list