[PATCH] D26817: [APFloat] Implement PPCDoubleDouble add and subtract.
Tim Shen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 13:01:17 PST 2016
timshen added inline comments.
Comment at: llvm/lib/Support/APFloat.cpp:4069
> kbarton wrote:
> > Why is this an empty string?
> Still an empty string :)
Removed unnecessary llvm_unreachable.
Comment at: llvm/lib/Support/APFloat.cpp:3948
+ Status |= zz.add(c, RM);
+ Status |= q.add(z, RM);
+ Status |= q.subtract(a, RM);
> It looks here like q = (a - z), but it would be useful to put that in the comment explicitly. Also, is there a reason for computing (a - (q + z)) as -((q + z) - a)?
We compute -((q + z) - a) instead of (a-(q+z)) to avoid creating temporary APFloat variables, thus avoid copying the object. Added a comment about that.
More information about the llvm-commits