summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/APFloat.cpp
diff options
context:
space:
mode:
authorStephen Canon <scanon@apple.com>2015-09-21 19:29:25 +0000
committerStephen Canon <scanon@apple.com>2015-09-21 19:29:25 +0000
commitb12db0e42ca1c0f58d740b44bdb3ec6b219291fd (patch)
treeb7df53b9e7f7fcab880e937d6dbdad3c6c0a4b6d /llvm/lib/Support/APFloat.cpp
parent8055ed0c127e96cc0d008b4560ce8c6c45af8885 (diff)
downloadbcm5719-llvm-b12db0e42ca1c0f58d740b44bdb3ec6b219291fd.tar.gz
bcm5719-llvm-b12db0e42ca1c0f58d740b44bdb3ec6b219291fd.zip
Remove roundingMode argument in APFloat::mod
Because mod is always exact, this function should have never taken a rounding mode argument. The actual implementation still has issues, which I'll look at resolving in a subsequent patch. llvm-svn: 248195
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
-rw-r--r--llvm/lib/Support/APFloat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index 6bcc053d467..91b3db59d0e 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -1771,7 +1771,7 @@ APFloat::remainder(const APFloat &rhs)
/* Normalized llvm frem (C fmod).
This is not currently correct in all cases. */
APFloat::opStatus
-APFloat::mod(const APFloat &rhs, roundingMode rounding_mode)
+APFloat::mod(const APFloat &rhs)
{
opStatus fs;
fs = modSpecials(rhs);
@@ -1796,10 +1796,10 @@ APFloat::mod(const APFloat &rhs, roundingMode rounding_mode)
rmNearestTiesToEven);
assert(fs==opOK); // should always work
- fs = V.multiply(rhs, rounding_mode);
+ fs = V.multiply(rhs, rmNearestTiesToEven);
assert(fs==opOK || fs==opInexact); // should not overflow or underflow
- fs = subtract(V, rounding_mode);
+ fs = subtract(V, rmNearestTiesToEven);
assert(fs==opOK || fs==opInexact); // likewise
if (isZero())
OpenPOWER on IntegriCloud