diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-06-01 11:26:33 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-06-01 11:26:33 +0000 |
commit | 6bef24f3d7d9fbaf986f437e9266244afb273e28 (patch) | |
tree | ecc5a07c592ccbc9a69f9652d33aafa62ebc1bf6 /llvm/lib/Support/APFloat.cpp | |
parent | c35854077b09c851446c0ee96d6a73707c2cc8fe (diff) | |
download | llvm-6bef24f3d7d9fbaf986f437e9266244afb273e28.zip llvm-6bef24f3d7d9fbaf986f437e9266244afb273e28.tar.gz llvm-6bef24f3d7d9fbaf986f437e9266244afb273e28.tar.bz2 |
APFloat: Use isDenormal instead of hand-rolled code to check for denormals.
llvm-svn: 183072
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
-rw-r--r-- | llvm/lib/Support/APFloat.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index 4efbaf7..16586fb 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/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 && |