[libc-commits] [libc] [llvm] [libc][math] Refactor ffmaf128 into a header only. (PR #177873)
via libc-commits
libc-commits at lists.llvm.org
Mon Feb 16 19:01:45 PST 2026
================
@@ -0,0 +1,27 @@
+//===-- Implementation header for ffmaf128 ----------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_FFMAF128_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_FFMAF128_H
+
+#include "src/__support/FPUtil/FMA.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+namespace math {
+
+LIBC_INLINE constexpr float ffmaf128(float128 x, float128 y, float128 z) {
----------------
parthtyagi27 wrote:
If the float inputs are constant and known at compile time then it can be constexpr no? Worst case the function is still invoked at runtime, which is valid for a constexpr function. Maybe I'm missing something?
https://github.com/llvm/llvm-project/pull/177873
More information about the libc-commits
mailing list