[libc-commits] [libc] [libc][NFC] Unify `FPBits` implementations (PR #76033)

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Thu Dec 21 04:11:59 PST 2023


================
@@ -107,6 +114,14 @@ template <FPType fp_type> struct FPBitsCommon : private FPProperties<fp_type> {
   LIBC_INLINE constexpr bool is_zero() const {
     return (bits & EXP_SIG_MASK) == 0;
   }
+
+  LIBC_INLINE constexpr bool is_inf() const {
+    if constexpr (UP::ENCODING == FPEncoding::X86_ExtendedPrecision) {
----------------
gchatelet wrote:

So as discussed off line, let's keep the specialization for `X86_Binary80` to prevent conflating the two implementations. Let's first submit patches up to and including f1b767dcdf453dd5b1beffbfc39c0ff8a5366916 and continue the review process on a different patch.

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


More information about the libc-commits mailing list