[llvm] r183072 - APFloat: Use isDenormal instead of hand-rolled code to check for denormals.
Benjamin Kramer
benny.kra at googlemail.com
Sat Jun 1 04:26:33 PDT 2013
Author: d0k
Date: Sat Jun 1 06:26:33 2013
New Revision: 183072
URL: http://llvm.org/viewvc/llvm-project?rev=183072&view=rev
Log:
APFloat: Use isDenormal instead of hand-rolled code to check for denormals.
Modified:
llvm/trunk/lib/Support/APFloat.cpp
Modified: llvm/trunk/lib/Support/APFloat.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=183072&r1=183071&r2=183072&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APFloat.cpp (original)
+++ llvm/trunk/lib/Support/APFloat.cpp Sat Jun 1 06:26:33 2013
@@ -3683,7 +3683,7 @@ bool APFloat::getExactInverse(APFloat *i
// 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 &&
More information about the llvm-commits
mailing list