[libc][reland] Fix builtin definition for memory functions
authorMichael Jones <michaelrj@google.com>
Fri, 11 Nov 2022 22:08:58 +0000 (14:08 -0800)
committerMichael Jones <michaelrj@google.com>
Fri, 18 Nov 2022 22:25:23 +0000 (14:25 -0800)
commitaf029d383a24ee454e1124f64f3427d5b79e5f7e
treee0f463ea475f12c2c1054f41f0f7f33c8d228018
parent9e595e911eb539caad99fd8642328007d47c6f4e
[libc][reland] Fix builtin definition for memory functions

The memory functions are highly performance sensitive and use builtins
where possible, but also need to define those functions names when they
don't exist to avoid compilation errors. Previously all those
redefinitions were behind the SSE2 flag for x86, which caused errors on
CPUs that supported SSE2 but not AVX512. This patch splits the various
CPU extensions out to avoid errors on such CPUs.

Reviewed By: gchatelet

Differential Revision: https://reviews.llvm.org/D138163
libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake
libc/src/string/CMakeLists.txt
libc/src/string/memory_utils/op_x86.h