fix a bug for hosts without round, PR8893.

llvm-svn: 131842
This commit is contained in:
Chris Lattner 2011-05-22 06:03:53 +00:00
parent bbc40ac474
commit 9f1d2ded13
1 changed files with 1 additions and 1 deletions

View File

@ -1375,7 +1375,7 @@ APInt APInt::sqrt() const {
uint64_t(::round(::sqrt(double(isSingleWord()?VAL:pVal[0])))));
#else
return APInt(BitWidth,
uint64_t(::sqrt(double(isSingleWord()?VAL:pVal[0]))) + 0.5);
uint64_t(::sqrt(double(isSingleWord()?VAL:pVal[0])) + 0.5));
#endif
}