Files
clang-p2996/libc/src/math/fma.cpp
Siva Chandra 95934c3a37 [libc] Add hardware implementations of fma and fmaf for x86_64 and aarch64.
The current generic implementation of the fmaf function has been moved
to the FPUtil directory. This allows one use the fma operation from
implementations of other math functions like the trignometric functions
without depending on/requiring the fma/fmaf/fmal function targets. If
this pattern ends being convenient, we will switch all generic math
implementations to this pattern.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D100811
2021-04-21 04:31:27 +00:00

21 lines
614 B
C++

//===-- Implementation of fma function ------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "src/math/fma.h"
#include "src/__support/common.h"
#include "utils/FPUtil/FMA.h"
namespace __llvm_libc {
LLVM_LIBC_FUNCTION(double, fma, (double x, double y, double z)) {
return fputil::fma(x, y, z);
}
} // namespace __llvm_libc