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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2017-05-15 22:01:03 +00:00
parent 4679522422
commit b4a39f7ccd
+1 -1
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;