[PATCH] D21920: Fix for Bug 26903 adds support to inline __builtin_mempcpy
Sunita_Marathe via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 1 12:35:13 PDT 2016
Sunita_Marathe added a comment.
Hi Krzysztof,
Thank you for your comments.
Yes, since the 2 functions only differ in their return value it seemed appropriate for the lowering of a call to mempcpy to always be done as if it were a call to memcpy, followed by the adjustment of the return pointer, to allow existing optimizations for memcpy to be leveraged.
Your point about what if the runtime library provides a mempcpy is valid. But would there be any reason for the runtime library of a platform to have a version of mempcpy which is of such a nature that a call to mempcpy cannot be replaced by a call to memcpy? My thinking had been that substituting memcpy for mempcpy would not negatively affect the user.
http://reviews.llvm.org/D21920
More information about the llvm-commits
mailing list