[PATCH] D69771: [APFloat] Handle exponent underflow correctly

Ehud Katz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 3 12:30:01 PST 2019


ekatz created this revision.
ekatz added reviewers: chandlerc, lattner.
ekatz added a project: LLVM.
Herald added subscribers: llvm-commits, dexonsmith, hiraditya.

Calculate the change in the exponent (for multiply/divide operations) in a bigger integer than ExponentType (in this case, `int` will do). Then make the new exponent fit into the actual field, while increasing it and shifting the significand accordingly, if needed.

Fix PR34851.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69771

Files:
  llvm/lib/Support/APFloat.cpp
  llvm/unittests/ADT/APFloatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69771.227626.patch
Type: text/x-patch
Size: 7557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191103/49652395/attachment.bin>


More information about the llvm-commits mailing list