[TargetLibraryInfo] memcpy and memset have optimized codegen.
authorClement Courbet <courbet@google.com>
Mon, 27 Apr 2020 08:45:41 +0000 (10:45 +0200)
committerClement Courbet <courbet@google.com>
Mon, 18 May 2020 06:49:23 +0000 (08:49 +0200)
commit521b216094340e7934c1dd7905982cc778237cb8
tree8d667da18c50fc8bbd896a94a38540daee2a8b90
parent7ee479a760e0a4402b4eb7fb6168768a44f66945
[TargetLibraryInfo] memcpy and memset have optimized codegen.

Summary:
Add memcpy and memset to the list of function with optimized codegen.
hasOptimizedCodeGen() was returning false for them.
This was not an issue when working with c++ as clang typically emits an
intrinsic rather than a libfunc call, but when working with IR,
this would cause some issues with sanitizers which would not correctly
mark the function as nobuiltin in `maybeMarkSanitizerLibraryCallNoBuiltin()`.

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78991
llvm/include/llvm/Analysis/TargetLibraryInfo.h