Enlarge the size of ExponentType from 16bit integer to 32bit. This is required to prevent exponent overflow/underflow.
Note that IEEEFloat size doesn't change in 64bit or 32bit compilation targets.
Fix PR34851.
Paths
| Differential D69771
[APFloat] Enlarge ExponentType to 32bit integer ClosedPublic Authored by ekatz on Nov 3 2019, 12:27 PM.
Details Summary Enlarge the size of ExponentType from 16bit integer to 32bit. This is required to prevent exponent overflow/underflow. Note that IEEEFloat size doesn't change in 64bit or 32bit compilation targets. Fix PR34851.
Diff Detail
Event TimelineHerald added subscribers: llvm-commits, dexonsmith, hiraditya. · View Herald TranscriptNov 3 2019, 12:27 PM efriedma added inline comments.
Comment Actions This is a simpler take for the solution. Also, added tests for other rounding modes, as requested. ekatz added inline comments.
ekatz retitled this revision from [APFloat] Handle exponent underflow correctly to [APFloat] Enlarge ExponentType to 32bit integer. Comment ActionsRemoved changes unrelated to topic. Comment Actions LGTM
This revision is now accepted and ready to land.Nov 19 2019, 11:58 AM Closed by commit rG8606d013983d: [APFloat] Enlarge ExponentType to 32bit integer (authored by ekatz). · Explain WhyNov 22 2019, 11:29 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 230697 llvm/include/llvm/ADT/APFloat.h
llvm/unittests/ADT/APFloatTest.cpp
|
What's the effect of this on the size of APFloat on a 64-bit target? On a 32-bit target?