Drop the hacks used for partial C99 math libraries.

All supported platforms have half-way decent C99 support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231679 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer
2015-03-09 18:35:18 +00:00
parent 1bee90c203
commit 0df66b878f
14 changed files with 6 additions and 1200 deletions
-5
View File
@@ -1310,13 +1310,8 @@ APInt APInt::sqrt() const {
// libc sqrt function which will probably use a hardware sqrt computation.
// This should be faster than the algorithm below.
if (magnitude < 52) {
#if HAVE_ROUND
return APInt(BitWidth,
uint64_t(::round(::sqrt(double(isSingleWord()?VAL:pVal[0])))));
#else
return APInt(BitWidth,
uint64_t(::sqrt(double(isSingleWord()?VAL:pVal[0])) + 0.5));
#endif
}
// Okay, all the short cuts are exhausted. We must compute it. The following