[PATCH] D86815: [LangRef] Adjust guarantee for llvm.memcyp to also allow equal arguments.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 11:51:23 PDT 2020


fhahn added a comment.

In D86815#2249028 <https://reviews.llvm.org/D86815#2249028>, @nlopes wrote:

> In D86815#2245481 <https://reviews.llvm.org/D86815#2245481>, @rsmith wrote:
>
>> There is a longstanding assumption made by ~every compiler that `memcpy(p, p, n)` is safe. That's what we should be encoding here. We should not be removing all overlap restrictions.
>
> If clang doesn't have a document stating the assumptions made about the run-time libraries (couldn't quickly find it), it might be useful to have one and mention this.

That sounds good, but I am not sure where this should be documented on the Clang side. I think this can also be done separately.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86815/new/

https://reviews.llvm.org/D86815



More information about the llvm-commits mailing list