fix a bug for hosts without round, PR8893.
authorChris Lattner <sabre@nondot.org>
Sun, 22 May 2011 06:03:53 +0000 (06:03 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 22 May 2011 06:03:53 +0000 (06:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131842 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/APInt.cpp

index 23a22ac68f3f955ff0799f0dc5c1785cf85d3ccc..74d61c13a5c9204704fe91f3a7789d758c517c09 100644 (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
   }