From 9f1d2ded139d1a0e058b87f213b8898d9bbf63f4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 22 May 2011 06:03:53 +0000 Subject: [PATCH] fix a bug for hosts without round, PR8893. llvm-svn: 131842 --- llvm/lib/Support/APInt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 23a22ac68f3f..74d61c13a5c9 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -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 }