[PATCH] D69776: [APFloat] Fix FP remainder operation
Ehud Katz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 21:13:22 PST 2020
ekatz marked an inline comment as done.
ekatz added inline comments.
================
Comment at: llvm/lib/Support/APFloat.cpp:1818
+ fs = remainderSpecials(rhs);
+ if (fs != opDivByZero)
return fs;
----------------
efriedma wrote:
> The opDivByZero thing is sort of confusing. Maybe just something like `if (!isFinite() || !rhs.isFinite()) return remainderSpecials(rhs);`?
I thought about that, but I just used the same convention as in `addOrSubtractSpecials`.
If we were to add this `if` statement, then we are actually handling **specials** outside the function that supposed to do exactly **that**. And that alone makes even less sense than the strange `opStatus` (which is commented, and used only internally).
It would have made more sense to add a new `opStatus` just for that case, but it seems a bit too much, I guess (at least for those //internal// functions).
Which is why I decided to take this approach.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69776/new/
https://reviews.llvm.org/D69776
More information about the llvm-commits
mailing list