diff options
-rw-r--r-- | llvm/include/llvm/ADT/APInt.h | 8 | ||||
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h index 6e611ad3fd3..262363f2c68 100644 --- a/llvm/include/llvm/ADT/APInt.h +++ b/llvm/include/llvm/ADT/APInt.h @@ -1249,7 +1249,7 @@ public: /// \returns true if *this <= RHS when considered signed. bool sle(uint64_t RHS) const { return !sgt(RHS); } - /// Unsigned greather than comparison + /// Unsigned greater than comparison /// /// Regards both *this and RHS as unsigned quantities and compares them for /// the validity of the greater-than relationship. @@ -1268,7 +1268,7 @@ public: return (!isSingleWord() && getActiveBits() > 64) || getZExtValue() > RHS; } - /// Signed greather than comparison + /// Signed greater than comparison /// /// Regards both *this and RHS as signed quantities and compares them for the /// validity of the greater-than relationship. @@ -2162,7 +2162,7 @@ inline float RoundAPIntToFloat(const APInt &APIVal) { /// Converts the given APInt to a float value. /// -/// Treast the APInt as a signed value for conversion purposes. +/// Treats the APInt as a signed value for conversion purposes. inline float RoundSignedAPIntToFloat(const APInt &APIVal) { return float(APIVal.signedRoundToDouble()); } @@ -2198,7 +2198,7 @@ APInt RoundingSDiv(const APInt &A, const APInt &B, APInt::Rounding RM); /// count as an overflow, but here we want to allow values to decrease /// and increase as long as they are within the same interval. /// Specifically, adding of two negative numbers should not cause an -/// overflow (as long as the magnitude does not exceed the bith width). +/// overflow (as long as the magnitude does not exceed the bit width). /// On the other hand, given a positive number, adding a negative /// number to it can give a negative result, which would cause the /// value to go from [-2^BW, 0) to [0, 2^BW). In that sense, zero is diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 5f2686c4055..431e2b70df0 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -187,7 +187,7 @@ APInt& APInt::operator--() { return clearUnusedBits(); } -/// Adds the RHS APint to this APInt. +/// Adds the RHS APInt to this APInt. /// @returns this, after addition of RHS. /// Addition assignment operator. APInt& APInt::operator+=(const APInt& RHS) { @@ -2830,7 +2830,7 @@ APInt llvm::APIntOps::RoundingSDiv(const APInt &A, const APInt &B, return Quo; return Quo + 1; } - // Currently sdiv rounds twards zero. + // Currently sdiv rounds towards zero. case APInt::Rounding::TOWARD_ZERO: return A.sdiv(B); } @@ -2973,7 +2973,7 @@ llvm::APIntOps::SolveQuadraticEquationWrap(APInt A, APInt B, APInt C, APInt Q = SQ * SQ; bool InexactSQ = Q != D; // The calculated SQ may actually be greater than the exact (non-integer) - // value. If that's the case, decremement SQ to get a value that is lower. + // value. If that's the case, decrement SQ to get a value that is lower. if (Q.sgt(D)) SQ -= 1; |