[APInt] Simplify a for loop initialization based on the fact that 'n' is known to be 1 by an earlier 'if'.

llvm-svn: 303120
This commit is contained in:
Craig Topper 2017-05-15 22:01:03 +00:00
parent d761e2c264
commit 6a1d02024e
1 changed files with 1 additions and 1 deletions

View File

@ -1476,7 +1476,7 @@ void APInt::divide(const APInt &LHS, unsigned lhsWords, const APInt &RHS,
if (n == 1) {
uint32_t divisor = V[0];
uint32_t remainder = 0;
for (int i = m+n-1; i >= 0; i--) {
for (int i = m; i >= 0; i--) {
uint64_t partial_dividend = Make_64(remainder, U[i]);
if (partial_dividend == 0) {
Q[i] = 0;