[libc-commits] [libc] [llvm] [libc][math] Refactor f16fmaf128 to Header Only (PR #177850)
via libc-commits
libc-commits at lists.llvm.org
Thu Feb 5 06:50:33 PST 2026
https://github.com/Sukumarsawant updated https://github.com/llvm/llvm-project/pull/177850
>From c520394ba0ac9c01dfd2dda981e4d5983594367b Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Sun, 25 Jan 2026 02:37:26 +0530
Subject: [PATCH 01/13] new files added
---
libc/shared/math/f16fmaf128.h | 30 ++++++++++++++++++++++++
libc/src/__support/math/f16fmaf128.h | 34 ++++++++++++++++++++++++++++
2 files changed, 64 insertions(+)
create mode 100644 libc/shared/math/f16fmaf128.h
create mode 100644 libc/src/__support/math/f16fmaf128.h
diff --git a/libc/shared/math/f16fmaf128.h b/libc/shared/math/f16fmaf128.h
new file mode 100644
index 0000000000000..f3dc9f07db550
--- /dev/null
+++ b/libc/shared/math/f16fmaf128.h
@@ -0,0 +1,30 @@
+//===-- Shared f16fmaf128 function -------------------------------*- 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_SHARED_MATH_F16FMAF128_H
+#define LLVM_LIBC_SHARED_MATH_F16FMAF128_H
+
+#include "include/llvm-libc-macros/float128-macros.h"
+#include "shared/libc_common.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+
+
+#include "src/__support/math/f16fmaf128.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::f16fmaf128;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#endif // LLVM_LIBC_SHARED_MATH_F16FMAF128_H
diff --git a/libc/src/__support/math/f16fmaf128.h b/libc/src/__support/math/f16fmaf128.h
new file mode 100644
index 0000000000000..a341e87eede48
--- /dev/null
+++ b/libc/src/__support/math/f16fmaf128.h
@@ -0,0 +1,34 @@
+//===-- Implementation header for f16fmaf128 ------------------------*- 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_F16FMAF128_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
+
+#include "include/llvm-libc-macros/float128-macros.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+
+#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 static float16 f16fmaf128(float128 x, float128 y, float128 z) {
+ return fputil::fma<float16>(x, y, z);
+}
+
+} // namespace math
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
>From 2e9c94826151d3cd11b7d225f218bb1d3a5cdba3 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Sun, 25 Jan 2026 02:37:55 +0530
Subject: [PATCH 02/13] edited files
---
libc/shared/math.h | 4 ++++
libc/shared/math/f16fmaf128.h | 5 ++++-
libc/src/__support/math/CMakeLists.txt | 12 ++++++++++++
libc/src/__support/math/f16fmaf128.h | 5 +++++
libc/src/math/generic/CMakeLists.txt | 3 +--
libc/src/math/generic/f16fmaf128.cpp | 6 ++----
libc/test/shared/CMakeLists.txt | 4 ++++
libc/test/shared/shared_math_test.cpp | 3 +++
utils/bazel/llvm-project-overlay/libc/BUILD.bazel | 14 +++++++++++++-
9 files changed, 48 insertions(+), 8 deletions(-)
diff --git a/libc/shared/math.h b/libc/shared/math.h
index b58d29d1ee480..788467c1199ee 100644
--- a/libc/shared/math.h
+++ b/libc/shared/math.h
@@ -60,9 +60,13 @@
#include "math/expm1f.h"
#include "math/expm1f16.h"
#include "math/f16fma.h"
+<<<<<<< HEAD
#include "math/f16fmal.h"
#include "math/f16sqrt.h"
#include "math/f16sqrtl.h"
+=======
+#include "math/f16fmaf128.h"
+>>>>>>> a01ef8ee0824 (edited files)
#include "math/frexpf.h"
#include "math/frexpf128.h"
#include "math/frexpf16.h"
diff --git a/libc/shared/math/f16fmaf128.h b/libc/shared/math/f16fmaf128.h
index f3dc9f07db550..ac0a473da0beb 100644
--- a/libc/shared/math/f16fmaf128.h
+++ b/libc/shared/math/f16fmaf128.h
@@ -1,3 +1,4 @@
+
//===-- Shared f16fmaf128 function -------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -10,13 +11,15 @@
#define LLVM_LIBC_SHARED_MATH_F16FMAF128_H
#include "include/llvm-libc-macros/float128-macros.h"
+#include "include/llvm-libc-macros/float16-macros.h"
#include "shared/libc_common.h"
#ifdef LIBC_TYPES_HAS_FLOAT128
-
#include "src/__support/math/f16fmaf128.h"
+
+
namespace LIBC_NAMESPACE_DECL {
namespace shared {
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index 58e4040911f8e..b3ec2a268fa30 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -675,6 +675,17 @@ add_header_library(
libc.include.llvm-libc-macros.float16_macros
)
+add_header_library(
+ f16fmaf128
+ HDRS
+ f16fmaf128.h
+ DEPENDS
+ libc.src.__support.FPUtil.fma
+ libc.src.__support.common
+ libc.src.__support.macros.config
+ libc.include.llvm-libc-macros.float128_macros
+)
+
add_header_library(
f16fmal
HDRS
@@ -683,6 +694,7 @@ add_header_library(
libc.src.__support.macros.config
libc.src.__support.FPUtil.fma
libc.include.llvm-libc-macros.float16_macros
+
)
add_header_library(
diff --git a/libc/src/__support/math/f16fmaf128.h b/libc/src/__support/math/f16fmaf128.h
index a341e87eede48..473a50a5fa87e 100644
--- a/libc/src/__support/math/f16fmaf128.h
+++ b/libc/src/__support/math/f16fmaf128.h
@@ -10,8 +10,12 @@
#define LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
#include "include/llvm-libc-macros/float128-macros.h"
+#include "include/llvm-libc-macros/float16-macros.h"
+#include "include/llvm-libc-types/float128.h"
+#include "include/llvm-libc-types/float16.h"
#ifdef LIBC_TYPES_HAS_FLOAT128
+#ifdef LIBC_TYPES_HAS_FLOAT16
#include "src/__support/FPUtil/FMA.h"
#include "src/__support/common.h"
@@ -29,6 +33,7 @@ LIBC_INLINE static float16 f16fmaf128(float128 x, float128 y, float128 z) {
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_HAS_FLOAT16
#endif // LIBC_TYPES_HAS_FLOAT128
#endif // LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index 1b18388ed60f8..6bd1d643e8241 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -5059,8 +5059,7 @@ add_entrypoint_object(
HDRS
../f16fmaf128.h
DEPENDS
- libc.src.__support.macros.properties.types
- libc.src.__support.FPUtil.fma
+ libc.src.__support.math.f16fmaf128.h
)
add_entrypoint_object(
diff --git a/libc/src/math/generic/f16fmaf128.cpp b/libc/src/math/generic/f16fmaf128.cpp
index 5c4823c47e79f..f8bcdc3028972 100644
--- a/libc/src/math/generic/f16fmaf128.cpp
+++ b/libc/src/math/generic/f16fmaf128.cpp
@@ -7,14 +7,12 @@
//===----------------------------------------------------------------------===//
#include "src/math/f16fmaf128.h"
-#include "src/__support/FPUtil/FMA.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/math/f16fmaf128.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(float16, f16fmaf128, (float128 x, float128 y, float128 z)) {
- return fputil::fma<float16>(x, y, z);
+ return math::f16fmaf128(x, y, z);
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index 07ccd0ca1bc4b..8fdc103a96b8b 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -56,9 +56,13 @@ add_fp_unittest(
libc.src.__support.math.expf
libc.src.__support.math.expf16
libc.src.__support.math.f16fma
+<<<<<<< HEAD
libc.src.__support.math.f16fmal
libc.src.__support.math.f16sqrt
libc.src.__support.math.f16sqrtl
+=======
+ libc.src.__support.math.f16fmaf128
+>>>>>>> a01ef8ee0824 (edited files)
libc.src.__support.math.frexpf
libc.src.__support.math.frexpf128
libc.src.__support.math.frexpf16
diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index ec70025f0f4ea..deb5d57352fa5 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -37,6 +37,9 @@ TEST(LlvmLibcSharedMathTest, AllFloat16) {
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::sinhf16(0.0f16));
EXPECT_FP_EQ(float16(10.0), LIBC_NAMESPACE::shared::f16fma(2.0, 3.0, 4.0));
+#if defined(LIBC_TYPES_HAS_FLOAT128)
+ EXPECT_FP_EQ(float16(10.0), LIBC_NAMESPACE::shared::f16fmaf128(float128(2.0), float128(3.0), float128(4.0)));
+#endif
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::f16sqrt(0.0));
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 83b752ce1214b..0d41f923d1aa1 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -2908,6 +2908,18 @@ libc_support_library(
],
)
+libc_support_library(
+ name = "__support_math_f16fmaf128",
+ hdrs = ["src/__support/math/f16fmaf128.h"],
+ deps = [
+ ":__support_fputil_fma",
+ ":__support_macros_config",
+ ":__support_common",
+ ":llvm_libc_macros_float128_macros",
+ ":llvm_libc_macros_float16_macros",
+ ],
+)
+
libc_support_library(
name = "__support_math_f16fmal",
hdrs = ["src/__support/math/f16fmal.h"],
@@ -4445,7 +4457,7 @@ libc_math_function(
libc_math_function(
name = "f16fmaf128",
additional_deps = [
- ":__support_fputil_fma",
+ ":__support_math_f16fmaf128",
],
)
>From b2b56fb9ce5c5add8648a9072d22877601c5189c Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Sun, 25 Jan 2026 11:00:23 +0530
Subject: [PATCH 03/13] fixed .h error
---
libc/src/math/generic/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index 6bd1d643e8241..97ab64e79055f 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -5059,7 +5059,7 @@ add_entrypoint_object(
HDRS
../f16fmaf128.h
DEPENDS
- libc.src.__support.math.f16fmaf128.h
+ libc.src.__support.math.f16fmaf128
)
add_entrypoint_object(
>From f1672a51897310f1f55d4d78c4e57bc01c796fb9 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Wed, 28 Jan 2026 12:40:46 +0530
Subject: [PATCH 04/13] resolved format issues and added float16 macro
---
libc/shared/math.h | 5 +----
libc/shared/math/f16fmaf128.h | 3 ---
libc/src/__support/math/CMakeLists.txt | 2 +-
libc/src/__support/math/f16fmaf128.h | 5 ++---
libc/test/shared/CMakeLists.txt | 5 +----
libc/test/shared/shared_math_test.cpp | 11 +++++++----
utils/bazel/llvm-project-overlay/libc/BUILD.bazel | 2 +-
7 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/libc/shared/math.h b/libc/shared/math.h
index 788467c1199ee..b0578fd3b1e9c 100644
--- a/libc/shared/math.h
+++ b/libc/shared/math.h
@@ -60,13 +60,10 @@
#include "math/expm1f.h"
#include "math/expm1f16.h"
#include "math/f16fma.h"
-<<<<<<< HEAD
+#include "math/f16fmaf28.h"
#include "math/f16fmal.h"
#include "math/f16sqrt.h"
#include "math/f16sqrtl.h"
-=======
-#include "math/f16fmaf128.h"
->>>>>>> a01ef8ee0824 (edited files)
#include "math/frexpf.h"
#include "math/frexpf128.h"
#include "math/frexpf16.h"
diff --git a/libc/shared/math/f16fmaf128.h b/libc/shared/math/f16fmaf128.h
index ac0a473da0beb..a5b637551c62f 100644
--- a/libc/shared/math/f16fmaf128.h
+++ b/libc/shared/math/f16fmaf128.h
@@ -1,4 +1,3 @@
-
//===-- Shared f16fmaf128 function -------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -18,8 +17,6 @@
#include "src/__support/math/f16fmaf128.h"
-
-
namespace LIBC_NAMESPACE_DECL {
namespace shared {
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index b3ec2a268fa30..ff3a57a19c258 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -684,6 +684,7 @@ add_header_library(
libc.src.__support.common
libc.src.__support.macros.config
libc.include.llvm-libc-macros.float128_macros
+ libc.include.llvm-libc-macros.float16_macros
)
add_header_library(
@@ -694,7 +695,6 @@ add_header_library(
libc.src.__support.macros.config
libc.src.__support.FPUtil.fma
libc.include.llvm-libc-macros.float16_macros
-
)
add_header_library(
diff --git a/libc/src/__support/math/f16fmaf128.h b/libc/src/__support/math/f16fmaf128.h
index 473a50a5fa87e..6af4778615ff5 100644
--- a/libc/src/__support/math/f16fmaf128.h
+++ b/libc/src/__support/math/f16fmaf128.h
@@ -1,4 +1,4 @@
-//===-- Implementation header for f16fmaf128 ------------------------*- C++ -*-===//
+//===-- Implementation header for f16fmaf128 --------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -11,8 +11,7 @@
#include "include/llvm-libc-macros/float128-macros.h"
#include "include/llvm-libc-macros/float16-macros.h"
-#include "include/llvm-libc-types/float128.h"
-#include "include/llvm-libc-types/float16.h"
+
#ifdef LIBC_TYPES_HAS_FLOAT128
#ifdef LIBC_TYPES_HAS_FLOAT16
diff --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index 8fdc103a96b8b..77bdca8ad8aec 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -56,13 +56,10 @@ add_fp_unittest(
libc.src.__support.math.expf
libc.src.__support.math.expf16
libc.src.__support.math.f16fma
-<<<<<<< HEAD
+ libc.src.__support.math.f16fmaf128
libc.src.__support.math.f16fmal
libc.src.__support.math.f16sqrt
libc.src.__support.math.f16sqrtl
-=======
- libc.src.__support.math.f16fmaf128
->>>>>>> a01ef8ee0824 (edited files)
libc.src.__support.math.frexpf
libc.src.__support.math.frexpf128
libc.src.__support.math.frexpf16
diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index deb5d57352fa5..d28828357a956 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -36,10 +36,13 @@ TEST(LlvmLibcSharedMathTest, AllFloat16) {
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::logf16(1.0f16));
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::sinhf16(0.0f16));
- EXPECT_FP_EQ(float16(10.0), LIBC_NAMESPACE::shared::f16fma(2.0, 3.0, 4.0));
-#if defined(LIBC_TYPES_HAS_FLOAT128)
- EXPECT_FP_EQ(float16(10.0), LIBC_NAMESPACE::shared::f16fmaf128(float128(2.0), float128(3.0), float128(4.0)));
-#endif
+EXPECT_FP_EQ(float16(10.0), LIBC_NAMESPACE::shared::f16fma(2.0, 3.0, 4.0));
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+
+ EXPECT_FP_EQ(10.0f16, LIBC_NAMESPACE::shared::f16fmaf128(float128(2.0), float128(3.0), float128(4.0)));
+
+#endif
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::f16sqrt(0.0));
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 0d41f923d1aa1..4a1cd0a5468b6 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -4457,7 +4457,7 @@ libc_math_function(
libc_math_function(
name = "f16fmaf128",
additional_deps = [
- ":__support_math_f16fmaf128",
+ ":__support_math_f16fmaf128",
],
)
>From 1a0f745a4647c00ad827946dfb4bf42d9796a396 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 29 Jan 2026 22:00:59 +0530
Subject: [PATCH 05/13] change-2 before rebase
---
libc/shared/math/f16fmaf128.h | 60 ++++++++++-----------
libc/src/__support/math/f16fmaf128.h | 75 +++++++++++++--------------
libc/test/shared/shared_math_test.cpp | 6 +--
3 files changed, 69 insertions(+), 72 deletions(-)
diff --git a/libc/shared/math/f16fmaf128.h b/libc/shared/math/f16fmaf128.h
index a5b637551c62f..2b5eb91724304 100644
--- a/libc/shared/math/f16fmaf128.h
+++ b/libc/shared/math/f16fmaf128.h
@@ -1,30 +1,30 @@
-//===-- Shared f16fmaf128 function -------------------------------*- 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_SHARED_MATH_F16FMAF128_H
-#define LLVM_LIBC_SHARED_MATH_F16FMAF128_H
-
-#include "include/llvm-libc-macros/float128-macros.h"
-#include "include/llvm-libc-macros/float16-macros.h"
-#include "shared/libc_common.h"
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-
-#include "src/__support/math/f16fmaf128.h"
-
-namespace LIBC_NAMESPACE_DECL {
-namespace shared {
-
-using math::f16fmaf128;
-
-} // namespace shared
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#endif // LLVM_LIBC_SHARED_MATH_F16FMAF128_H
+//===-- Shared f16fmaf128 function ------------------------------*- 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_SHARED_MATH_F16FMAF128_H
+#define LLVM_LIBC_SHARED_MATH_F16FMAF128_H
+
+#include "include/llvm-libc-macros/float128-macros.h"
+#include "include/llvm-libc-macros/float16-macros.h"
+#include "shared/libc_common.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+
+#include "src/__support/math/f16fmaf128.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::f16fmaf128;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#endif // LLVM_LIBC_SHARED_MATH_F16FMAF128_H
diff --git a/libc/src/__support/math/f16fmaf128.h b/libc/src/__support/math/f16fmaf128.h
index 6af4778615ff5..2d120068e5502 100644
--- a/libc/src/__support/math/f16fmaf128.h
+++ b/libc/src/__support/math/f16fmaf128.h
@@ -1,38 +1,37 @@
-//===-- Implementation header for f16fmaf128 --------------------*- 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_F16FMAF128_H
-#define LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
-
-#include "include/llvm-libc-macros/float128-macros.h"
-#include "include/llvm-libc-macros/float16-macros.h"
-
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-#ifdef LIBC_TYPES_HAS_FLOAT16
-
-#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 static float16 f16fmaf128(float128 x, float128 y, float128 z) {
- return fputil::fma<float16>(x, y, z);
-}
-
-} // namespace math
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LIBC_TYPES_HAS_FLOAT16
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#endif // LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
+//===-- Implementation header for f16fmaf128 --------------------*- 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_F16FMAF128_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
+
+#include "include/llvm-libc-macros/float128-macros.h"
+#include "include/llvm-libc-macros/float16-macros.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+#ifdef LIBC_TYPES_HAS_FLOAT16
+
+#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 static float16 f16fmaf128(float128 x, float128 y, float128 z) {
+ return fputil::fma<float16>(x, y, z);
+}
+
+} // namespace math
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT16
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index d28828357a956..2519888268471 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -19,7 +19,6 @@ TEST(LlvmLibcSharedMathTest, AllFloat16) {
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::acospif16(1.0f16));
EXPECT_FP_EQ(0x1p+0f16, LIBC_NAMESPACE::shared::rsqrtf16(1.0f16));
EXPECT_FP_EQ(0x1p+0f16, LIBC_NAMESPACE::shared::sqrtf16(1.0f16));
-
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::asinf16(0.0f16));
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::asinhf16(0.0f16));
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::atanf16(0.0f16));
@@ -36,13 +35,13 @@ TEST(LlvmLibcSharedMathTest, AllFloat16) {
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::logf16(1.0f16));
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::sinhf16(0.0f16));
-EXPECT_FP_EQ(float16(10.0), LIBC_NAMESPACE::shared::f16fma(2.0, 3.0, 4.0));
+ EXPECT_FP_EQ(float16(10.0), LIBC_NAMESPACE::shared::f16fma(2.0, 3.0, 4.0));
#ifdef LIBC_TYPES_HAS_FLOAT128
EXPECT_FP_EQ(10.0f16, LIBC_NAMESPACE::shared::f16fmaf128(float128(2.0), float128(3.0), float128(4.0)));
-#endif
+#endif
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::f16sqrt(0.0));
@@ -60,7 +59,6 @@ EXPECT_FP_EQ(float16(10.0), LIBC_NAMESPACE::shared::f16fma(2.0, 3.0, 4.0));
EXPECT_EQ(0, LIBC_NAMESPACE::shared::ilogbf16(1.0f16));
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::logbf16(1.0f16));
EXPECT_EQ(0L, LIBC_NAMESPACE::shared::llogbf16(1.0f16));
-
EXPECT_FP_EQ(0x1.921fb6p+0f16, LIBC_NAMESPACE::shared::acosf16(0.0f16));
EXPECT_FP_EQ(0x1p+0f16, LIBC_NAMESPACE::shared::f16sqrtl(1.0L));
EXPECT_FP_EQ(0.0f16, LIBC_NAMESPACE::shared::sinf16(0.0f16));
>From 5a400b2ced6126234c88e52b4e99374913c5b671 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 29 Jan 2026 22:08:59 +0530
Subject: [PATCH 06/13] math.h spell err
---
libc/shared/math.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/shared/math.h b/libc/shared/math.h
index b0578fd3b1e9c..32b4bdf599f2a 100644
--- a/libc/shared/math.h
+++ b/libc/shared/math.h
@@ -60,7 +60,7 @@
#include "math/expm1f.h"
#include "math/expm1f16.h"
#include "math/f16fma.h"
-#include "math/f16fmaf28.h"
+#include "math/f16fmaf128.h"
#include "math/f16fmal.h"
#include "math/f16sqrt.h"
#include "math/f16sqrtl.h"
>From 76582376d51b32d1a6f0714d1d841d8557d06109 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 29 Jan 2026 23:37:34 +0530
Subject: [PATCH 07/13] replace float128-macros with float128
---
libc/shared/math/f16fmaf128.h | 2 +-
libc/src/__support/math/CMakeLists.txt | 2 +-
libc/src/__support/math/f16fmaf128.h | 2 +-
utils/bazel/llvm-project-overlay/libc/BUILD.bazel | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libc/shared/math/f16fmaf128.h b/libc/shared/math/f16fmaf128.h
index 2b5eb91724304..eaf2b20562251 100644
--- a/libc/shared/math/f16fmaf128.h
+++ b/libc/shared/math/f16fmaf128.h
@@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SHARED_MATH_F16FMAF128_H
#define LLVM_LIBC_SHARED_MATH_F16FMAF128_H
-#include "include/llvm-libc-macros/float128-macros.h"
+#include "include/llvm-libc-types/float128.h"
#include "include/llvm-libc-macros/float16-macros.h"
#include "shared/libc_common.h"
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index ff3a57a19c258..a520ede69419a 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -683,7 +683,7 @@ add_header_library(
libc.src.__support.FPUtil.fma
libc.src.__support.common
libc.src.__support.macros.config
- libc.include.llvm-libc-macros.float128_macros
+ libc.include.llvm-libc-types.float128
libc.include.llvm-libc-macros.float16_macros
)
diff --git a/libc/src/__support/math/f16fmaf128.h b/libc/src/__support/math/f16fmaf128.h
index 2d120068e5502..0c4206385cf29 100644
--- a/libc/src/__support/math/f16fmaf128.h
+++ b/libc/src/__support/math/f16fmaf128.h
@@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
#define LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
-#include "include/llvm-libc-macros/float128-macros.h"
+#include "include/llvm-libc-types/float128.h"
#include "include/llvm-libc-macros/float16-macros.h"
#ifdef LIBC_TYPES_HAS_FLOAT128
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 4a1cd0a5468b6..ea319412fbb15 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -2915,7 +2915,7 @@ libc_support_library(
":__support_fputil_fma",
":__support_macros_config",
":__support_common",
- ":llvm_libc_macros_float128_macros",
+ ":llvm_libc_types_float128",
":llvm_libc_macros_float16_macros",
],
)
>From 085e7fcee09b7500d001e0a3c03bf07095050e1b Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Fri, 30 Jan 2026 11:08:41 +0530
Subject: [PATCH 08/13] formatting
---
libc/shared/math/f16fmaf128.h | 12 ++++++------
libc/src/__support/math/f16fmaf128.h | 10 +++++-----
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/libc/shared/math/f16fmaf128.h b/libc/shared/math/f16fmaf128.h
index eaf2b20562251..69a4b6b37553f 100644
--- a/libc/shared/math/f16fmaf128.h
+++ b/libc/shared/math/f16fmaf128.h
@@ -7,12 +7,12 @@
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_SHARED_MATH_F16FMAF128_H
-#define LLVM_LIBC_SHARED_MATH_F16FMAF128_H
-
-#include "include/llvm-libc-types/float128.h"
-#include "include/llvm-libc-macros/float16-macros.h"
-#include "shared/libc_common.h"
-
+#define LLVM_LIBC_SHARED_MATH_F16FMAF128_H
+
+#include "include/llvm-libc-macros/float16-macros.h"
+#include "include/llvm-libc-types/float128.h"
+#include "shared/libc_common.h"
+
#ifdef LIBC_TYPES_HAS_FLOAT128
#include "src/__support/math/f16fmaf128.h"
diff --git a/libc/src/__support/math/f16fmaf128.h b/libc/src/__support/math/f16fmaf128.h
index 0c4206385cf29..d68f97516a2cd 100644
--- a/libc/src/__support/math/f16fmaf128.h
+++ b/libc/src/__support/math/f16fmaf128.h
@@ -7,11 +7,11 @@
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
-#define LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
-
-#include "include/llvm-libc-types/float128.h"
-#include "include/llvm-libc-macros/float16-macros.h"
-
+#define LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
+
+#include "include/llvm-libc-macros/float16-macros.h"
+#include "include/llvm-libc-types/float128.h"
+
#ifdef LIBC_TYPES_HAS_FLOAT128
#ifdef LIBC_TYPES_HAS_FLOAT16
>From fb277320d4fd92d642a8349d947f5efc57dba218 Mon Sep 17 00:00:00 2001
From: bassiounix <muhammad.m.bassiouni at gmail.com>
Date: Fri, 30 Jan 2026 08:03:11 +0200
Subject: [PATCH 09/13] fix: format
---
libc/shared/math/f16fmaf128.h | 2 +-
libc/src/__support/math/f16fmaf128.h | 2 +-
utils/bazel/llvm-project-overlay/libc/BUILD.bazel | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libc/shared/math/f16fmaf128.h b/libc/shared/math/f16fmaf128.h
index 69a4b6b37553f..118f0c0e24952 100644
--- a/libc/shared/math/f16fmaf128.h
+++ b/libc/shared/math/f16fmaf128.h
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SHARED_MATH_F16FMAF128_H
+#ifndef LLVM_LIBC_SHARED_MATH_F16FMAF128_H
#define LLVM_LIBC_SHARED_MATH_F16FMAF128_H
#include "include/llvm-libc-macros/float16-macros.h"
diff --git a/libc/src/__support/math/f16fmaf128.h b/libc/src/__support/math/f16fmaf128.h
index d68f97516a2cd..d2cf940a9a95d 100644
--- a/libc/src/__support/math/f16fmaf128.h
+++ b/libc/src/__support/math/f16fmaf128.h
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
#define LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
#include "include/llvm-libc-macros/float16-macros.h"
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index ea319412fbb15..ba484c26b2ef4 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -2912,11 +2912,11 @@ libc_support_library(
name = "__support_math_f16fmaf128",
hdrs = ["src/__support/math/f16fmaf128.h"],
deps = [
+ ":__support_common",
":__support_fputil_fma",
":__support_macros_config",
- ":__support_common",
- ":llvm_libc_types_float128",
":llvm_libc_macros_float16_macros",
+ ":llvm_libc_types_float128",
],
)
>From 338d050668c02bb644adbfa688f983c141f933da Mon Sep 17 00:00:00 2001
From: bassiounix <muhammad.m.bassiouni at gmail.com>
Date: Fri, 30 Jan 2026 08:16:12 +0200
Subject: [PATCH 10/13] clang-format try 2
---
libc/shared/math/f16fmaf128.h | 46 ++++++++++-----------
libc/src/__support/math/f16fmaf128.h | 62 ++++++++++++++--------------
2 files changed, 54 insertions(+), 54 deletions(-)
diff --git a/libc/shared/math/f16fmaf128.h b/libc/shared/math/f16fmaf128.h
index 118f0c0e24952..08c78ec39efce 100644
--- a/libc/shared/math/f16fmaf128.h
+++ b/libc/shared/math/f16fmaf128.h
@@ -1,11 +1,11 @@
-//===-- Shared f16fmaf128 function ------------------------------*- 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
-//
-//===----------------------------------------------------------------------===//
-
+//===-- Shared f16fmaf128 function ------------------------------*- 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_SHARED_MATH_F16FMAF128_H
#define LLVM_LIBC_SHARED_MATH_F16FMAF128_H
@@ -13,18 +13,18 @@
#include "include/llvm-libc-types/float128.h"
#include "shared/libc_common.h"
-#ifdef LIBC_TYPES_HAS_FLOAT128
-
-#include "src/__support/math/f16fmaf128.h"
-
-namespace LIBC_NAMESPACE_DECL {
-namespace shared {
-
-using math::f16fmaf128;
-
-} // namespace shared
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#endif // LLVM_LIBC_SHARED_MATH_F16FMAF128_H
+#ifdef LIBC_TYPES_HAS_FLOAT128
+
+#include "src/__support/math/f16fmaf128.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::f16fmaf128;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#endif // LLVM_LIBC_SHARED_MATH_F16FMAF128_H
diff --git a/libc/src/__support/math/f16fmaf128.h b/libc/src/__support/math/f16fmaf128.h
index d2cf940a9a95d..f0265b8f387cd 100644
--- a/libc/src/__support/math/f16fmaf128.h
+++ b/libc/src/__support/math/f16fmaf128.h
@@ -1,37 +1,37 @@
-//===-- Implementation header for f16fmaf128 --------------------*- 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
-//
-//===----------------------------------------------------------------------===//
-
+//===-- Implementation header for f16fmaf128 --------------------*- 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_F16FMAF128_H
#define LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
#include "include/llvm-libc-macros/float16-macros.h"
#include "include/llvm-libc-types/float128.h"
-#ifdef LIBC_TYPES_HAS_FLOAT128
-#ifdef LIBC_TYPES_HAS_FLOAT16
-
-#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 static float16 f16fmaf128(float128 x, float128 y, float128 z) {
- return fputil::fma<float16>(x, y, z);
-}
-
-} // namespace math
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LIBC_TYPES_HAS_FLOAT16
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#endif // LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
+#ifdef LIBC_TYPES_HAS_FLOAT128
+#ifdef LIBC_TYPES_HAS_FLOAT16
+
+#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 static float16 f16fmaf128(float128 x, float128 y, float128 z) {
+ return fputil::fma<float16>(x, y, z);
+}
+
+} // namespace math
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT16
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_F16FMAF128_H
>From a5f51a129535eedb5a2a781cf7f42211128d1693 Mon Sep 17 00:00:00 2001
From: bassiounix <muhammad.m.bassiouni at gmail.com>
Date: Fri, 30 Jan 2026 08:31:09 +0200
Subject: [PATCH 11/13] chore: fix format
---
libc/test/shared/shared_math_test.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index 2519888268471..a258b480e3b71 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -39,7 +39,8 @@ TEST(LlvmLibcSharedMathTest, AllFloat16) {
#ifdef LIBC_TYPES_HAS_FLOAT128
- EXPECT_FP_EQ(10.0f16, LIBC_NAMESPACE::shared::f16fmaf128(float128(2.0), float128(3.0), float128(4.0)));
+ EXPECT_FP_EQ(10.0f16, LIBC_NAMESPACE::shared::f16fmaf128(
+ float128(2.0), float128(3.0), float128(4.0)));
#endif
>From bf51efd43ecd8c54339a764ea6b81b2ef3f87f67 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Fri, 30 Jan 2026 12:24:34 +0530
Subject: [PATCH 12/13] deleted line
---
libc/test/shared/shared_math_test.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index a258b480e3b71..c00076deee8be 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -19,6 +19,7 @@ TEST(LlvmLibcSharedMathTest, AllFloat16) {
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::acospif16(1.0f16));
EXPECT_FP_EQ(0x1p+0f16, LIBC_NAMESPACE::shared::rsqrtf16(1.0f16));
EXPECT_FP_EQ(0x1p+0f16, LIBC_NAMESPACE::shared::sqrtf16(1.0f16));
+
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::asinf16(0.0f16));
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::asinhf16(0.0f16));
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::atanf16(0.0f16));
@@ -60,6 +61,7 @@ TEST(LlvmLibcSharedMathTest, AllFloat16) {
EXPECT_EQ(0, LIBC_NAMESPACE::shared::ilogbf16(1.0f16));
EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::logbf16(1.0f16));
EXPECT_EQ(0L, LIBC_NAMESPACE::shared::llogbf16(1.0f16));
+
EXPECT_FP_EQ(0x1.921fb6p+0f16, LIBC_NAMESPACE::shared::acosf16(0.0f16));
EXPECT_FP_EQ(0x1p+0f16, LIBC_NAMESPACE::shared::f16sqrtl(1.0L));
EXPECT_FP_EQ(0.0f16, LIBC_NAMESPACE::shared::sinf16(0.0f16));
>From 2bde8f9a9bc38dd69a41789496784510a4f339d9 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 5 Feb 2026 20:03:51 +0530
Subject: [PATCH 13/13] reflecting 823e3e0 changes + rebased to main + (not
formated | tested )
---
libc/src/__support/math/f16fmaf128.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/src/__support/math/f16fmaf128.h b/libc/src/__support/math/f16fmaf128.h
index f0265b8f387cd..a8ba4bce9eb30 100644
--- a/libc/src/__support/math/f16fmaf128.h
+++ b/libc/src/__support/math/f16fmaf128.h
@@ -23,7 +23,7 @@ namespace LIBC_NAMESPACE_DECL {
namespace math {
-LIBC_INLINE static float16 f16fmaf128(float128 x, float128 y, float128 z) {
+LIBC_INLINE float16 f16fmaf128(float128 x, float128 y, float128 z) {
return fputil::fma<float16>(x, y, z);
}
More information about the libc-commits
mailing list