Fix IEEEFloat::remainder() function.
Fix PR3359.
Paths
| Differential D69776
[APFloat] Fix FP remainder operation ClosedPublic Authored by ekatz on Nov 3 2019, 1:02 PM.
Details
Diff Detail Event Timelineekatz added a child revision: D69777: [ConstantFolding] Fold calls to FP remainder function.Nov 3 2019, 1:06 PM Comment Actions Thanks for posting patches to fix problems with the APFloat implementation. FWIW, this code is hard to review, from my perspective, because it lacks comments (both your new code and the code it is replacing). As you clearly have gone through this and understand what it's doing, could you add a bunch of comments explaining what's going on? I think that would be very helpful for everyone else.
Comment Actions I'd like to see more test coverage for denormal denominators, and denominators close to the max finite float.
ekatz added inline comments.
This revision is now accepted and ready to land.Feb 11 2020, 2:33 PM Closed by commit rG9d0956ebd471: [APFloat] Fix FP remainder operation (authored by ekatz). · Explain WhyFeb 12 2020, 12:52 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 243655 llvm/include/llvm/ADT/APFloat.h
llvm/lib/Support/APFloat.cpp
llvm/unittests/ADT/APFloatTest.cpp
|
The opDivByZero thing is sort of confusing. Maybe just something like if (!isFinite() || !rhs.isFinite()) return remainderSpecials(rhs);?