[libc-commits] [libc] [libc][test] Remove more unused nan variables (PR #155925)

Jordan Rupprecht via libc-commits libc-commits at lists.llvm.org
Thu Aug 28 14:27:52 PDT 2025


https://github.com/rupprecht created https://github.com/llvm/llvm-project/pull/155925

These are redefined/shadowed by the if constexpr (FPBits::FRACTION_LEN - 1 >= 5) case below.

Added by https://github.com/llvm/llvm-project/pull/155569. I missed these ones in #155894.

>From 92f4100dc5854780f13e2ca52c658b39b53c45e3 Mon Sep 17 00:00:00 2001
From: Jordan Rupprecht <rupprecht at google.com>
Date: Thu, 28 Aug 2025 14:26:02 -0700
Subject: [PATCH] [libc][test] Remove more unused nan variables

---
 libc/test/src/math/smoke/TotalOrderMagTest.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/libc/test/src/math/smoke/TotalOrderMagTest.h b/libc/test/src/math/smoke/TotalOrderMagTest.h
index 32f3932cb3f6d..8a389df089328 100644
--- a/libc/test/src/math/smoke/TotalOrderMagTest.h
+++ b/libc/test/src/math/smoke/TotalOrderMagTest.h
@@ -106,12 +106,6 @@ class TotalOrderMagTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
   }
 
   void testNaNPayloads(TotalOrderMagFunc func) {
-
-    T qnan_0x15 = FPBits::quiet_nan(Sign::POS, 0x15).get_val();
-    T neg_qnan_0x15 = FPBits::quiet_nan(Sign::NEG, 0x15).get_val();
-    T snan_0x15 = FPBits::signaling_nan(Sign::POS, 0x15).get_val();
-    T neg_snan_0x15 = FPBits::signaling_nan(Sign::NEG, 0x15).get_val();
-
     EXPECT_TRUE(funcWrapper(func, aNaN, aNaN));
     EXPECT_TRUE(funcWrapper(func, sNaN, sNaN));
 



More information about the libc-commits mailing list