diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index 8adbfdfeecb..f2d4390a811 100644 --- a/include/llvm/ADT/APInt.h +++ b/include/llvm/ADT/APInt.h @@ -1984,31 +1984,6 @@ inline APInt RoundFloatToAPInt(float Float, unsigned width) { return RoundDoubleToAPInt(double(Float), width); } -/// \brief Signed division function for APInt. -/// -/// Signed divide APInt LHS by APInt RHS. -inline APInt sdiv(const APInt &LHS, const APInt &RHS) { return LHS.sdiv(RHS); } - -/// \brief Unsigned division function for APInt. -/// -/// Unsigned divide APInt LHS by APInt RHS. -inline APInt udiv(const APInt &LHS, const APInt &RHS) { return LHS.udiv(RHS); } - -/// \brief Function for signed remainder operation. -/// -/// Signed remainder operation on APInt. -inline APInt srem(const APInt &LHS, const APInt &RHS) { return LHS.srem(RHS); } - -/// \brief Function for unsigned remainder operation. -/// -/// Unsigned remainder operation on APInt. -inline APInt urem(const APInt &LHS, const APInt &RHS) { return LHS.urem(RHS); } - -/// \brief Function for multiplication operation. -/// -/// Performs multiplication on APInt values. -inline APInt mul(const APInt &LHS, const APInt &RHS) { return LHS * RHS; } - } // End of APIntOps namespace // See friend declaration above. This additional declaration is required in diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 659a1e5e1e7..986209acfd0 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -7221,7 +7221,7 @@ SolveQuadraticEquation(const SCEVAddRecExpr *AddRec, ScalarEvolution &SE) { // Convert from chrec coefficients to polynomial coefficients AX^2+BX+C // The B coefficient is M-N/2 APInt B(M); - B -= sdiv(N,Two); + B -= N.sdiv(Two); // The A coefficient is N/2 APInt A(N.sdiv(Two)); diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index 8ac881e4c7f..d6139504f9a 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -881,7 +881,7 @@ APInt llvm::APIntOps::GreatestCommonDivisor(const APInt& API1, APInt A = API1, B = API2; while (!!B) { APInt T = B; - B = APIntOps::urem(A, B); + B = A.urem(B); A = T; } return A;