[libc-commits] [PATCH] D152459: [libc] Add Int<> type and fix (U)Int<128> compatibility issues.

Mikhail Ramalho via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Jun 12 14:00:21 PDT 2023


mikhail.ramalho accepted this revision.
mikhail.ramalho added a comment.
This revision is now accepted and ready to land.

The tests are all passing in rv32 once we apply D148797 <https://reviews.llvm.org/D148797>, D150211 <https://reviews.llvm.org/D150211>, D150223 <https://reviews.llvm.org/D150223> and the following change:

  diff --git a/libc/src/__support/FPUtil/generic/sqrt.h b/libc/src/__support/FPUtil/generic/sqrt.h
  index 9e9896ed185f..7c4e4a485320 100644
  --- a/libc/src/__support/FPUtil/generic/sqrt.h
  +++ b/libc/src/__support/FPUtil/generic/sqrt.h
  @@ -137,7 +137,7 @@ LIBC_INLINE cpp::enable_if_t<cpp::is_floating_point_v<T>, T> sqrt(T x) {
         }
   
         // We compute one more iteration in order to round correctly.
  -      bool lsb = y & 1; // Least significant bit
  +      bool lsb = bool(y & 1); // Least significant bit
         bool rb = false;  // Round bit
         r <<= 2;
         UIntType tmp = (y << 2) + 1;

Feel free to add it to this patch, otherwise, I can add it to D150223 <https://reviews.llvm.org/D150223> once I rebase it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152459/new/

https://reviews.llvm.org/D152459



More information about the libc-commits mailing list