summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-06-01 11:26:33 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-06-01 11:26:33 +0000
commit77e5c2a1791b4f0338820e377bd255858bde64d5 (patch)
treead3ba2adad7e8c7014b437046cb694a696af7d32 /lib
parent95a565a063cfd5fe59299ced3fa318e261035fe5 (diff)
downloadllvm-77e5c2a1791b4f0338820e377bd255858bde64d5.tar.gz
llvm-77e5c2a1791b4f0338820e377bd255858bde64d5.tar.bz2
llvm-77e5c2a1791b4f0338820e377bd255858bde64d5.tar.xz
APFloat: Use isDenormal instead of hand-rolled code to check for denormals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Support/APFloat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp
index 4efbaf7a90..16586fbc9e 100644
--- a/lib/Support/APFloat.cpp
+++ b/lib/Support/APFloat.cpp
@@ -3683,7 +3683,7 @@ bool APFloat::getExactInverse(APFloat *inv) const {
// Avoid multiplication with a denormal, it is not safe on all platforms and
// may be slower than a normal division.
- if (reciprocal.significandMSB() + 1 < reciprocal.semantics->precision)
+ if (reciprocal.isDenormal())
return false;
assert(reciprocal.category == fcNormal &&