From ef36e8380a9109c43ef4a564083428a14a9b818a Mon Sep 17 00:00:00 2001 From: Anthony Steinhauser Date: Thu, 24 Sep 2020 22:03:52 -0700 Subject: [PATCH] [libc] Using llvm_libc memcpy in mem* benchmarks. Currently the mem* benchmarks use memcpy from Glibc and memset from LLVM libc. That's misleading and produces inconsistent results and behaviors. This change makes Memcpy.cpp consistent with Memset.cpp: https://github.com/llvm/llvm-project/blob/master/libc/benchmarks/Memset.cpp#L49 Reviewers: sivachandra Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D88271 --- libc/benchmarks/Memcpy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libc/benchmarks/Memcpy.cpp b/libc/benchmarks/Memcpy.cpp index eb3085355762..4c7b86c5261d 100644 --- a/libc/benchmarks/Memcpy.cpp +++ b/libc/benchmarks/Memcpy.cpp @@ -48,8 +48,8 @@ struct MemcpyContext : public BenchmarkRunner { BenchmarkResult benchmark(const BenchmarkOptions &Options, StringRef FunctionName, size_t Size) override { - FunctionPrototype Function = - StringSwitch(FunctionName).Case("memcpy", &::memcpy); + FunctionPrototype Function = StringSwitch(FunctionName) + .Case("memcpy", &__llvm_libc::memcpy); return llvm::libc_benchmarks::benchmark( Options, PP, [this, Function, Size](ParameterType p) { Function(DstBuffer + p.DstOffset, SrcBuffer + p.SrcOffset, Size);