diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/APFixedPoint.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Support/APFixedPoint.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/APFixedPoint.cpp b/contrib/llvm-project/llvm/lib/Support/APFixedPoint.cpp index 9764dd51f572..61b30b5c5c60 100644 --- a/contrib/llvm-project/llvm/lib/Support/APFixedPoint.cpp +++ b/contrib/llvm-project/llvm/lib/Support/APFixedPoint.cpp @@ -306,7 +306,7 @@ APFixedPoint APFixedPoint::div(const APFixedPoint &Other, APInt::sdivrem(ThisVal, OtherVal, Result, Rem); // If the quotient is negative and the remainder is nonzero, round // towards negative infinity by subtracting epsilon from the result. - if (ThisVal.isNegative() != OtherVal.isNegative() && !Rem.isNullValue()) + if (ThisVal.isNegative() != OtherVal.isNegative() && !Rem.isZero()) Result = Result - 1; } else Result = ThisVal.udiv(OtherVal); @@ -381,7 +381,7 @@ void APFixedPoint::toString(SmallVectorImpl<char> &Str) const { // Add 4 digits to hold the value after multiplying 10 (the radix) unsigned Width = Val.getBitWidth() + 4; APInt FractPart = Val.zextOrTrunc(Scale).zext(Width); - APInt FractPartMask = APInt::getAllOnesValue(Scale).zext(Width); + APInt FractPartMask = APInt::getAllOnes(Scale).zext(Width); APInt RadixInt = APInt(Width, 10); IntPart.toString(Str, /*Radix=*/10); |