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
This commit is contained in:
Benjamin Kramer 2013-06-01 11:26:33 +00:00
parent 95a565a063
commit 77e5c2a179

View File

@ -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 &&