[libc-commits] [PATCH] D129918: [libc] Add utility classes for checking exceptional values.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Jul 18 10:40:07 PDT 2022


sivachandra added inline comments.


================
Comment at: libc/src/__support/FPUtil/except_value_utils.h:19
+
+template <typename T, int N> struct ExceptionalValues {
+  using UIntType = typename FPBits<T>::UIntType;
----------------
Can you please add documentation about the need and how to use this class?


================
Comment at: libc/src/__support/FPUtil/except_value_utils.h:40
+    for (int i = 0; i < N; ++i) {
+      if (unlikely(x_abs == ExceptVals.inputs[i])) {
+        UIntType out_bits = ExceptVals.outputs[i][0]; // FE_TOWARDZERO
----------------
What is `x_abs` here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129918



More information about the libc-commits mailing list