]> granicus.if.org Git - llvm/commitdiff
[APInt] Fix indentation of tcDivide. Combine variable declaration and initialization.
authorCraig Topper <craig.topper@gmail.com>
Wed, 10 May 2017 07:50:17 +0000 (07:50 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 10 May 2017 07:50:17 +0000 (07:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302626 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/APInt.cpp

index 99a7b18b1731293982c9a59de01ac2e58b5e67ee..c4be405152d1242b8753e1e3905350fb992d074e 100644 (file)
@@ -2386,22 +2386,20 @@ int APInt::tcDivide(WordType *lhs, const WordType *rhs,
   /* Loop, subtracting SRHS if REMAINDER is greater and adding that to
      the total.  */
   for (;;) {
-      int compare;
-
-      compare = tcCompare(remainder, srhs, parts);
-      if (compare >= 0) {
-        tcSubtract(remainder, srhs, 0, parts);
-        lhs[n] |= mask;
-      }
+    int compare = tcCompare(remainder, srhs, parts);
+    if (compare >= 0) {
+      tcSubtract(remainder, srhs, 0, parts);
+      lhs[n] |= mask;
+    }
 
-      if (shiftCount == 0)
-        break;
-      shiftCount--;
-      tcShiftRight(srhs, parts, 1);
-      if ((mask >>= 1) == 0) {
-        mask = (WordType) 1 << (APINT_BITS_PER_WORD - 1);
-        n--;
-      }
+    if (shiftCount == 0)
+      break;
+    shiftCount--;
+    tcShiftRight(srhs, parts, 1);
+    if ((mask >>= 1) == 0) {
+      mask = (WordType) 1 << (APINT_BITS_PER_WORD - 1);
+      n--;
+    }
   }
 
   return false;