[libc-commits] [libc] [llvm] [libc] Make totalorder functions use the emulated float128 type (PR #221085)

via libc-commits libc-commits at lists.llvm.org
Sun Sep 6 06:27:07 PDT 2026


================
@@ -386,6 +386,15 @@ static_assert(Float128(0.0) ==
                                                    Float128(0.0)));
 static_assert(Float128(1.0) ==
               LIBC_NAMESPACE::shared::fabsf128(Float128(-1.0)));
+constexpr Float128 TOTALORDERF128_X = Float128(0.0);
+constexpr Float128 TOTALORDERF128_Y = Float128(0.0);
+static_assert(1 == LIBC_NAMESPACE::shared::totalorderf128(&TOTALORDERF128_X,
+                                                          &TOTALORDERF128_Y));
+constexpr Float128 TOTALORDERMAGF128_X = Float128(0.0);
+constexpr Float128 TOTALORDERMAGF128_Y = Float128(0.0);
+static_assert(1 ==
+              LIBC_NAMESPACE::shared::totalordermagf128(&TOTALORDERMAGF128_X,
+                                                        &TOTALORDERMAGF128_Y));
----------------
Sukumarsawant wrote:

nit: order

https://github.com/llvm/llvm-project/pull/221085


More information about the libc-commits mailing list