summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-05-10 07:50:17 +0000
committerCraig Topper <craig.topper@gmail.com>2017-05-10 07:50:17 +0000
commita584af5c8ec0d5ae61fa895c6f8e500af8406450 (patch)
tree299b087a00ae09d963b63d5f7f46339876a64e6f /llvm/lib/Support
parent62de039bd1123aaea4abbfa85ab17ce739f046ec (diff)
downloadbcm5719-llvm-a584af5c8ec0d5ae61fa895c6f8e500af8406450.tar.gz
bcm5719-llvm-a584af5c8ec0d5ae61fa895c6f8e500af8406450.zip
[APInt] Fix indentation of tcDivide. Combine variable declaration and initialization.
llvm-svn: 302626
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/APInt.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index 99a7b18b173..c4be405152d 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -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;
OpenPOWER on IntegriCloud