[libc-commits] [libc] [llvm] [libc] Make totalorder functions use the emulated float128 type (PR #221085)
Muhammad Haris Awan via libc-commits
libc-commits at lists.llvm.org
Sat Sep 19 13:36:43 PDT 2026
harisawan-bit wrote:
@Sukumarsawant Thanks for the detailed review! I've updated everything and rebased cleanly on latest `main`:
1. **`clang-format`**: Formatted `libc/src/__support/math/totalorderf128.h`.
2. **Implementation simplification**: Removed the `#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128` blocks in both `totalorderf128.cpp` and `totalordermagf128.cpp`, keeping the clean `cpp::bit_cast<Float128>` call matching sibling functions.
3. **Bazel entries**: Added `:__support_fputil_float128` and `:__support_cpp_bit` to `libc/BUILD.bazel`, and added `//libc:__support_fputil_float128` to `math_test` rules for `totalorderf128` and `totalordermagf128` in `libc/test/src/math/smoke/BUILD.bazel`.
4. **MPFR tests verification**: Checked and verified that GNU MPFR does not support `totalorder`/`totalordermag` (these are IEEE 754 bit-level ordering predicates rather than numerical approximations), and `MPFRWrapper` has no totalorder helpers. Comprehensive test coverage is provided in `libc/test/src/math/smoke/` with `TotalOrderTest.h` and `TotalOrderMagTest.h`.
5. **Headers**: Updated the remaining touched files (`shared_math_test.cpp` and `shared_math_constexpr_test.cpp`) to the standard Doxygen file headers per LLVM coding standards.
All review conversations are marked resolved and branch is ready for review. Thanks!
https://github.com/llvm/llvm-project/pull/221085
More information about the libc-commits
mailing list