mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Patch to support MSVC, contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
988d174e96
commit
219c141815
@ -1984,7 +1984,7 @@ SolveQuadraticEquation(const SCEVAddRecExpr *AddRec) {
|
||||
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 ||
|
||||
|
Loading…
Reference in New Issue
Block a user