[libc-commits] [libc] [llvm] [libc][math] Add isnanf128 (PR #199206)

Vedant Neve via libc-commits libc-commits at lists.llvm.org
Fri Jun 5 10:50:45 PDT 2026


https://github.com/0bVdnt updated https://github.com/llvm/llvm-project/pull/199206

>From 881931cf53ca796418e1ccdcb7d71354c333b33f Mon Sep 17 00:00:00 2001
From: Vedant Neve <vedantneve13 at gmail.com>
Date: Fri, 22 May 2026 12:06:07 +0000
Subject: [PATCH 1/3] [libc][math] Add isnanf128

---
 libc/config/baremetal/aarch64/entrypoints.txt |  1 +
 libc/config/baremetal/arm/entrypoints.txt     |  1 +
 libc/config/baremetal/riscv/entrypoints.txt   |  1 +
 libc/config/darwin/aarch64/entrypoints.txt    |  1 +
 libc/config/linux/aarch64/entrypoints.txt     |  1 +
 libc/config/linux/riscv/entrypoints.txt       |  1 +
 libc/config/linux/x86_64/entrypoints.txt      |  1 +
 libc/shared/math.h                            |  1 +
 libc/shared/math/isnanf128.h                  | 29 ++++++++++
 libc/src/__support/math/CMakeLists.txt        | 10 ++++
 libc/src/__support/math/isnanf128.h           | 31 ++++++++++
 libc/src/math/CMakeLists.txt                  |  1 +
 libc/src/math/generic/CMakeLists.txt          | 10 ++++
 libc/src/math/generic/isnanf128.cpp           | 16 ++++++
 libc/src/math/isnanf128.h                     | 21 +++++++
 libc/test/shared/CMakeLists.txt               |  2 +
 .../shared/shared_math_constexpr_test.cpp     |  1 +
 libc/test/shared/shared_math_test.cpp         |  1 +
 libc/test/src/math/smoke/CMakeLists.txt       | 12 ++++
 libc/test/src/math/smoke/IsNanTest.h          | 56 +++++++++++++++++++
 libc/test/src/math/smoke/isnanf128_test.cpp   | 13 +++++
 21 files changed, 211 insertions(+)
 create mode 100644 libc/shared/math/isnanf128.h
 create mode 100644 libc/src/__support/math/isnanf128.h
 create mode 100644 libc/src/math/generic/isnanf128.cpp
 create mode 100644 libc/src/math/isnanf128.h
 create mode 100644 libc/test/src/math/smoke/IsNanTest.h
 create mode 100644 libc/test/src/math/smoke/isnanf128_test.cpp

diff --git a/libc/config/baremetal/aarch64/entrypoints.txt b/libc/config/baremetal/aarch64/entrypoints.txt
index dcb50135232e2..6fa1d22d726c3 100644
--- a/libc/config/baremetal/aarch64/entrypoints.txt
+++ b/libc/config/baremetal/aarch64/entrypoints.txt
@@ -758,6 +758,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.getpayloadf128
     libc.src.math.ilogbf128
     libc.src.math.iscanonicalf128
+    libc.src.math.isnanf128
     libc.src.math.issignalingf128
     libc.src.math.ldexpf128
     libc.src.math.llogbf128
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index fac62bac939cc..c2aa17e125b88 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -769,6 +769,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.getpayloadf128
     libc.src.math.ilogbf128
     libc.src.math.iscanonicalf128
+    libc.src.math.isnanf128
     libc.src.math.issignalingf128
     libc.src.math.ldexpf128
     libc.src.math.llogbf128
diff --git a/libc/config/baremetal/riscv/entrypoints.txt b/libc/config/baremetal/riscv/entrypoints.txt
index a3b96225ff09d..05c48ed0e1f51 100644
--- a/libc/config/baremetal/riscv/entrypoints.txt
+++ b/libc/config/baremetal/riscv/entrypoints.txt
@@ -766,6 +766,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.getpayloadf128
     libc.src.math.ilogbf128
     libc.src.math.iscanonicalf128
+    libc.src.math.isnanf128
     libc.src.math.issignalingf128
     libc.src.math.ldexpf128
     libc.src.math.llogbf128
diff --git a/libc/config/darwin/aarch64/entrypoints.txt b/libc/config/darwin/aarch64/entrypoints.txt
index 914d2b7918da1..30b4709efe74f 100644
--- a/libc/config/darwin/aarch64/entrypoints.txt
+++ b/libc/config/darwin/aarch64/entrypoints.txt
@@ -579,6 +579,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.getpayloadf128
     libc.src.math.ilogbf128
     libc.src.math.iscanonicalf128
+    libc.src.math.isnanf128
     libc.src.math.issignalingf128
     libc.src.math.ldexpf128
     libc.src.math.llogbf128
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index a50923fddec54..deb1b9c42ca0d 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -871,6 +871,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.getpayloadf128
     libc.src.math.ilogbf128
     libc.src.math.iscanonicalf128
+    libc.src.math.isnanf128
     libc.src.math.issignalingf128
     libc.src.math.ldexpf128
     libc.src.math.llogbf128
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index 51c769d853a52..a3d63bf9414dc 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -892,6 +892,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.getpayloadf128
     libc.src.math.ilogbf128
     libc.src.math.iscanonicalf128
+    libc.src.math.isnanf128
     libc.src.math.issignalingf128
     libc.src.math.ldexpf128
     libc.src.math.llogbf128
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 5545790fecd85..488195daaeac4 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -957,6 +957,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
     libc.src.math.getpayloadf128
     libc.src.math.ilogbf128
     libc.src.math.iscanonicalf128
+    libc.src.math.isnanf128
     libc.src.math.issignalingf128
     libc.src.math.ldexpf128
     libc.src.math.llogbf128
diff --git a/libc/shared/math.h b/libc/shared/math.h
index 2baeb07294a3b..aa2efab7336b5 100644
--- a/libc/shared/math.h
+++ b/libc/shared/math.h
@@ -291,6 +291,7 @@
 // TODO: isnan is a macro in <math.h>
 // #include "math/isnan.h"
 #include "math/isnanf.h"
+#include "math/isnanf128.h"
 #include "math/isnanl.h"
 // TODO: issignaling is a macro in <math.h>
 // #include "math/issignaling.h"
diff --git a/libc/shared/math/isnanf128.h b/libc/shared/math/isnanf128.h
new file mode 100644
index 0000000000000..3d9ee44b6070d
--- /dev/null
+++ b/libc/shared/math/isnanf128.h
@@ -0,0 +1,29 @@
+//===-- Shared isnanf128 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_ISNANF128_H
+#define LLVM_LIBC_SHARED_MATH_ISNANF128_H
+
+#include "include/llvm-libc-types/float128.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+
+#include "shared/libc_common.h"
+#include "src/__support/math/isnanf128.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::isnanf128;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#endif // LLVM_LIBC_SHARED_MATH_ISNANF128_H
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index 9e3ec26cdc881..8e946ccbb4c57 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -1695,6 +1695,16 @@ add_header_library(
     libc.src.__support.macros.config
 )
 
+add_header_library(
+  isnanf128
+  HDRS
+    isnanf128.h
+  DEPENDS
+    libc.include.llvm-libc-types.float128
+    libc.src.__support.FPUtil.fp_bits
+    libc.src.__support.macros.config
+)
+
 add_header_library(
   isnanl
   HDRS
diff --git a/libc/src/__support/math/isnanf128.h b/libc/src/__support/math/isnanf128.h
new file mode 100644
index 0000000000000..4676764808a91
--- /dev/null
+++ b/libc/src/__support/math/isnanf128.h
@@ -0,0 +1,31 @@
+//===-- Implementation header for isnanf128 ---------------------*- 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_ISNANF128_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_ISNANF128_H
+
+#include "include/llvm-libc-types/float128.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+
+#include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE LIBC_CONSTEXPR int isnanf128(float128 x) {
+  return fputil::FPBits<float128>(x).is_nan();
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_ISNANF128_H
diff --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt
index b53817e2a1729..3d79e42c032a5 100644
--- a/libc/src/math/CMakeLists.txt
+++ b/libc/src/math/CMakeLists.txt
@@ -367,6 +367,7 @@ add_math_entrypoint_object(ilogbbf16)
 
 add_math_entrypoint_object(isnan)
 add_math_entrypoint_object(isnanf)
+add_math_entrypoint_object(isnanf128)
 add_math_entrypoint_object(isnanl)
 
 add_math_entrypoint_object(issignaling)
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index 7ccbddba07b8d..de8171a3322c7 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -3031,6 +3031,16 @@ add_entrypoint_object(
     libc.src.__support.math.isnanf
 )
 
+add_entrypoint_object(
+  isnanf128
+  SRCS
+    isnanf128.cpp
+  HDRS
+    ../isnanf128.h
+  DEPENDS
+    libc.src.__support.math.isnanf128
+)
+
 add_entrypoint_object(
   isnanl
   SRCS
diff --git a/libc/src/math/generic/isnanf128.cpp b/libc/src/math/generic/isnanf128.cpp
new file mode 100644
index 0000000000000..919136fe3e4fb
--- /dev/null
+++ b/libc/src/math/generic/isnanf128.cpp
@@ -0,0 +1,16 @@
+//===-- Implementation of isnanf128 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/isnanf128.h"
+#include "src/__support/math/isnanf128.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(int, isnanf128, (float128 x)) { return math::isnanf128(x); }
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/isnanf128.h b/libc/src/math/isnanf128.h
new file mode 100644
index 0000000000000..968e858519421
--- /dev/null
+++ b/libc/src/math/isnanf128.h
@@ -0,0 +1,21 @@
+//===-- Implementation header for isnanf128 ---------------------*- 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_MATH_ISNANF128_H
+#define LLVM_LIBC_SRC_MATH_ISNANF128_H
+
+#include "src/__support/macros/config.h"
+#include "src/__support/macros/properties/types.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+int isnanf128(float128 x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_MATH_ISNANF128_H
diff --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index 84a8d4bf79b3d..c9126b8767c32 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -286,6 +286,7 @@ add_fp_unittest(
     libc.src.__support.math.iscanonicall
     libc.src.__support.math.isnan
     libc.src.__support.math.isnanf
+    libc.src.__support.math.isnanf128
     libc.src.__support.math.isnanl
     libc.src.__support.math.issignaling
     libc.src.__support.math.issignalingbf16
@@ -658,6 +659,7 @@ add_fp_unittest(
     libc.src.__support.math.iscanonicall
     libc.src.__support.math.isnan
     libc.src.__support.math.isnanf
+    libc.src.__support.math.isnanf128
     libc.src.__support.math.isnanl
     libc.src.__support.math.issignaling
     libc.src.__support.math.issignalingbf16
diff --git a/libc/test/shared/shared_math_constexpr_test.cpp b/libc/test/shared/shared_math_constexpr_test.cpp
index 821042e1dab92..1206e79e906b0 100644
--- a/libc/test/shared/shared_math_constexpr_test.cpp
+++ b/libc/test/shared/shared_math_constexpr_test.cpp
@@ -490,6 +490,7 @@ static_assert(float128(0.0) ==
                                                     float128(0.0)));
 static_assert(float128(0.0) == LIBC_NAMESPACE::shared::rintf128(float128(0.0)));
 static_assert(1 == LIBC_NAMESPACE::shared::iscanonicalf128(float128(0.0)));
+static_assert(0 == LIBC_NAMESPACE::shared::isnanf128(float128(0.0)));
 static_assert(0.0 == LIBC_NAMESPACE::shared::issignalingf128(float128(0.0)));
 static_assert(1 == [] {
   const char arg{};
diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index 634778380dc8e..8dd8d69635aab 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -739,6 +739,7 @@ TEST(LlvmLibcSharedMathTest, AllFloat128) {
                LIBC_NAMESPACE::shared::nearbyintf128(float128(0.0)));
   EXPECT_FP_EQ(float128(0.0), LIBC_NAMESPACE::shared::rintf128(float128(0.0)));
   EXPECT_EQ(1, LIBC_NAMESPACE::shared::iscanonicalf128(float128(0.0)));
+  EXPECT_EQ(0, LIBC_NAMESPACE::shared::isnanf128(float128(0.0)));
   EXPECT_EQ(0, LIBC_NAMESPACE::shared::issignalingf128(float128(0.0)));
   EXPECT_TRUE(FPBits(LIBC_NAMESPACE::shared::nanf128("")).is_nan());
   EXPECT_FP_EQ(float128(0.0), LIBC_NAMESPACE::shared::roundf128(float128(0.0)));
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index 28b85b1a25bbd..2a38ce6b1a07a 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -521,6 +521,18 @@ add_fp_unittest(
     libc.src.__support.FPUtil.bfloat16
 )
 
+add_fp_unittest(
+  isnanf128_test
+  SUITE
+    libc-math-smoke-tests
+  SRCS
+    isnanf128_test.cpp
+  HDRS
+    IsNanTest.h
+  DEPENDS
+    libc.src.math.isnanf128
+)
+
 add_fp_unittest(
   ceil_test
   SUITE
diff --git a/libc/test/src/math/smoke/IsNanTest.h b/libc/test/src/math/smoke/IsNanTest.h
new file mode 100644
index 0000000000000..8fe53f81a849b
--- /dev/null
+++ b/libc/test/src/math/smoke/IsNanTest.h
@@ -0,0 +1,56 @@
+//===-- Utility class to test different flavors of isnan --------*- 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_TEST_SRC_MATH_SMOKE_ISNANTEST_H
+#define LLVM_LIBC_TEST_SRC_MATH_SMOKE_ISNANTEST_H
+
+#include "test/UnitTest/FEnvSafeTest.h"
+#include "test/UnitTest/FPMatcher.h"
+#include "test/UnitTest/Test.h"
+
+template <typename T>
+class IsNanTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
+
+  DECLARE_SPECIAL_CONSTANTS(T)
+
+public:
+  typedef int (*IsNanFunc)(T);
+
+  void testSpecialNumbers(IsNanFunc func) {
+    EXPECT_EQ(func(aNaN), 1);
+    EXPECT_EQ(func(neg_aNaN), 1);
+    EXPECT_EQ(func(sNaN), 1);
+    EXPECT_EQ(func(neg_sNaN), 1);
+    EXPECT_EQ(func(inf), 0);
+    EXPECT_EQ(func(neg_inf), 0);
+    EXPECT_EQ(func(min_normal), 0);
+    EXPECT_EQ(func(max_normal), 0);
+    EXPECT_EQ(func(neg_max_normal), 0);
+    EXPECT_EQ(func(min_denormal), 0);
+    EXPECT_EQ(func(neg_min_denormal), 0);
+    EXPECT_EQ(func(max_denormal), 0);
+    EXPECT_EQ(func(zero), 0);
+    EXPECT_EQ(func(neg_zero), 0);
+  }
+
+  void testRoundedNumbers(IsNanFunc func) {
+    EXPECT_EQ(func(T(1.0)), 0);
+    EXPECT_EQ(func(T(-1.0)), 0);
+    EXPECT_EQ(func(T(10.0)), 0);
+    EXPECT_EQ(func(T(-10.0)), 0);
+    EXPECT_EQ(func(T(1234.0)), 0);
+    EXPECT_EQ(func(T(-1234.0)), 0);
+  }
+};
+
+#define LIST_ISNAN_TESTS(T, func)                                              \
+  using LlvmLibcIsNanTest = IsNanTest<T>;                                      \
+  TEST_F(LlvmLibcIsNanTest, SpecialNumbers) { testSpecialNumbers(&func); }     \
+  TEST_F(LlvmLibcIsNanTest, RoundedNumbers) { testRoundedNumbers(&func); }
+
+#endif // LLVM_LIBC_TEST_SRC_MATH_SMOKE_ISNANTEST_H
diff --git a/libc/test/src/math/smoke/isnanf128_test.cpp b/libc/test/src/math/smoke/isnanf128_test.cpp
new file mode 100644
index 0000000000000..061370adce558
--- /dev/null
+++ b/libc/test/src/math/smoke/isnanf128_test.cpp
@@ -0,0 +1,13 @@
+//===-- Unittests for isnanf128 -------------------------------------------===//
+//
+// 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 "IsNanTest.h"
+
+#include "src/math/isnanf128.h"
+
+LIST_ISNAN_TESTS(float128, LIBC_NAMESPACE::isnanf128)

>From 7d1ff4e4e91672da113c144c6834ab7584a7a660 Mon Sep 17 00:00:00 2001
From: Vedant Neve <vedantneve13 at gmail.com>
Date: Sat, 23 May 2026 05:32:41 +0000
Subject: [PATCH 2/3] [libc][math] Add isnanf128 support and Bazel integration

---
 libc/include/math.yaml                          |  7 +++++++
 .../bazel/llvm-project-overlay/libc/BUILD.bazel | 17 +++++++++++++++++
 .../libc/test/src/math/smoke/BUILD.bazel        |  5 +++++
 3 files changed, 29 insertions(+)

diff --git a/libc/include/math.yaml b/libc/include/math.yaml
index 36ff380a1b305..5b4771a4038f8 100644
--- a/libc/include/math.yaml
+++ b/libc/include/math.yaml
@@ -1600,6 +1600,13 @@ functions:
     return_type: int
     arguments:
       - type: float
+  - name: isnanf128
+    standards:
+      - bsd
+    return_type: int
+    arguments:
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT128
   - name: isnanl
     standards:
       - bsd
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 87963e4524b39..aefce850667c9 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -5307,6 +5307,16 @@ libc_support_library(
     ],
 )
 
+libc_support_library(
+    name = "__support_math_isnanf128",
+    hdrs = ["src/__support/math/isnanf128.h"],
+    deps = [
+        ":__support_fputil_fp_bits",
+        ":__support_macros_config",
+        ":llvm_libc_types_float128",
+    ],
+)
+
 libc_support_library(
     name = "__support_math_isnanl",
     hdrs = ["src/__support/math/isnanl.h"],
@@ -9924,6 +9934,13 @@ libc_math_function(
     ],
 )
 
+libc_math_function(
+    name = "isnanf128",
+    additional_deps = [
+        ":__support_math_isnanf128",
+    ],
+)
+
 libc_math_function(
     name = "isnanl",
     additional_deps = [
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
index 637dc85227a97..4ada7746dad69 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
@@ -991,6 +991,11 @@ math_test(
     hdrs = ["ILogbTest.h"],
 )
 
+math_test(
+    name = "isnanf128",
+    hdrs = ["IsNanTest.h"],
+)
+
 math_test(
     name = "llogbf16",
     hdrs = ["ILogbTest.h"],

>From b23a6f72b519e7c70c3af8bfae444cdd94f79df9 Mon Sep 17 00:00:00 2001
From: Vedant Neve <vedantneve13 at gmail.com>
Date: Fri, 5 Jun 2026 17:48:06 +0000
Subject: [PATCH 3/3] Update libc/src/__support/math/isnanf128.h

Signed-off-by: Vedant Neve <vedantneve13 at gmail.com>
---
 libc/src/__support/math/isnanf128.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/src/__support/math/isnanf128.h b/libc/src/__support/math/isnanf128.h
index 4676764808a91..94a2a3da0918f 100644
--- a/libc/src/__support/math/isnanf128.h
+++ b/libc/src/__support/math/isnanf128.h
@@ -19,7 +19,7 @@
 namespace LIBC_NAMESPACE_DECL {
 namespace math {
 
-LIBC_INLINE LIBC_CONSTEXPR int isnanf128(float128 x) {
+LIBC_INLINE constexpr int isnanf128(float128 x) {
   return fputil::FPBits<float128>(x).is_nan();
 }
 



More information about the libc-commits mailing list