[libc] Add support for x86-64 targets that do not have FMA instructions.
authorTue Ly <lntue@google.com>
Thu, 7 Apr 2022 20:02:10 +0000 (16:02 -0400)
committerTue Ly <lntue@google.com>
Fri, 8 Apr 2022 18:12:24 +0000 (14:12 -0400)
commitc5f8a0a1e929ea41bd3e0d781c6b394a3f619427
tree9edde00f445c547d31f78d29be562c11d9834cc7
parentd49c0ba5abdeb8f6ebe081d96e0fdf44de46e7f8
[libc] Add support for x86-64 targets that do not have FMA instructions.

Make FMA flag checks more accurate for x86-64 targets, and refactor
polyeval to use multiply and add instead when FMA instructions are not
available.

Reviewed By: michaelrj, sivachandra

Differential Revision: https://reviews.llvm.org/D123335
16 files changed:
libc/src/__support/FPUtil/CMakeLists.txt
libc/src/__support/FPUtil/FMA.h
libc/src/__support/FPUtil/PolyEval.h
libc/src/__support/FPUtil/aarch64/FMA.h
libc/src/__support/FPUtil/generic/CMakeLists.txt
libc/src/__support/FPUtil/generic/FMA.h
libc/src/__support/FPUtil/multiply_add.h [new file with mode: 0644]
libc/src/__support/FPUtil/x86_64/FMA.h
libc/src/__support/architectures.h
libc/src/math/CMakeLists.txt
libc/src/math/generic/CMakeLists.txt
libc/src/math/generic/expm1f.cpp
libc/src/math/generic/log10f.cpp
libc/src/math/generic/log1pf.cpp
libc/src/math/generic/logf.cpp
utils/bazel/llvm-project-overlay/libc/BUILD.bazel