[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 25 11:40:22 PDT 2004
Changes in directory llvm/lib/Analysis:
ScalarEvolution.cpp updated: 1.27 -> 1.28
---
Log message:
Patch to support MSVC, contributed by Morten Ofstad
---
Diffs of the changes: (+1 -1)
Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.27 llvm/lib/Analysis/ScalarEvolution.cpp:1.28
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.27 Mon Oct 11 20:49:27 2004
+++ llvm/lib/Analysis/ScalarEvolution.cpp Mon Oct 25 13:40:08 2004
@@ -1984,7 +1984,7 @@
cast<ConstantUInt>(ConstantExpr::getCast(SqrtTerm,
SqrtTerm->getType()->getUnsignedVersion()));
uint64_t SqrtValV = SqrtVal->getValue();
- uint64_t SqrtValV2 = (uint64_t)sqrt(SqrtValV);
+ uint64_t SqrtValV2 = (uint64_t)sqrt((double)SqrtValV);
// The square root might not be precise for arbitrary 64-bit integer
// values. Do some sanity checks to ensure it's correct.
if (SqrtValV2*SqrtValV2 > SqrtValV ||
More information about the llvm-commits
mailing list