[PATCH] D86815: [LangRef] Remove non-overlapping guarantee from memcpy.

Richard Smith - zygoloid via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 14:46:47 PDT 2020


rsmith added a comment.

In D86815#2245467 <https://reviews.llvm.org/D86815#2245467>, @arsenm wrote:

> In D86815#2245466 <https://reviews.llvm.org/D86815#2245466>, @arsenm wrote:
>
>> Why would we change this? What's the point of having separate memcpy and memmove intrinsics?
>
> I'm reading this as clang mis-uses llvm.memcpy when it probably should be using llvm.memmove

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.


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