[PATCH] D127140: [APFloat] Fix truncation of certain subnormal numbers

Danila Malyutin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 11:36:36 PDT 2022


danilaml added inline comments.


================
Comment at: llvm/lib/Support/APFloat.cpp:2235
+    // it would return incorrect result if the significand is zero after shift
+    if (isDenormal())
+      lostFraction = lfLessThanHalf;
----------------
Not 100% sure it is safe to use this function here (after the shift), rather than just `exponent == semantics->minExponent` or something.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127140



More information about the llvm-commits mailing list