forked from OSchip/llvm-project
[APInt] Remove 'else' after 'return' in tcMultiply methods. NFC
llvm-svn: 302406
This commit is contained in:
parent
9bcaed867a
commit
a6c142ab4d
|
@ -2311,7 +2311,8 @@ int APInt::tcMultiplyPart(WordType *dst, const WordType *src,
|
||||||
assert(i + 1 == dstParts);
|
assert(i + 1 == dstParts);
|
||||||
dst[i] = carry;
|
dst[i] = carry;
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
/* We overflowed if there is carry. */
|
/* We overflowed if there is carry. */
|
||||||
if (carry)
|
if (carry)
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -2327,7 +2328,6 @@ int APInt::tcMultiplyPart(WordType *dst, const WordType *src,
|
||||||
/* We fitted in the narrow destination. */
|
/* We fitted in the narrow destination. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* DST = LHS * RHS, where DST has the same width as the operands and
|
/* DST = LHS * RHS, where DST has the same width as the operands and
|
||||||
is filled with the least significant parts of the result. Returns
|
is filled with the least significant parts of the result. Returns
|
||||||
|
@ -2355,9 +2355,9 @@ unsigned APInt::tcFullMultiply(WordType *dst, const WordType *lhs,
|
||||||
const WordType *rhs, unsigned lhsParts,
|
const WordType *rhs, unsigned lhsParts,
|
||||||
unsigned rhsParts) {
|
unsigned rhsParts) {
|
||||||
/* Put the narrower number on the LHS for less loops below. */
|
/* Put the narrower number on the LHS for less loops below. */
|
||||||
if (lhsParts > rhsParts) {
|
if (lhsParts > rhsParts)
|
||||||
return tcFullMultiply (dst, rhs, lhs, rhsParts, lhsParts);
|
return tcFullMultiply (dst, rhs, lhs, rhsParts, lhsParts);
|
||||||
} else {
|
|
||||||
assert(dst != lhs && dst != rhs);
|
assert(dst != lhs && dst != rhs);
|
||||||
|
|
||||||
tcSet(dst, 0, rhsParts);
|
tcSet(dst, 0, rhsParts);
|
||||||
|
@ -2369,7 +2369,6 @@ unsigned APInt::tcFullMultiply(WordType *dst, const WordType *lhs,
|
||||||
|
|
||||||
return n - (dst[n - 1] == 0);
|
return n - (dst[n - 1] == 0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* If RHS is zero LHS and REMAINDER are left unchanged, return one.
|
/* If RHS is zero LHS and REMAINDER are left unchanged, return one.
|
||||||
Otherwise set LHS to LHS / RHS with the fractional part discarded,
|
Otherwise set LHS to LHS / RHS with the fractional part discarded,
|
||||||
|
|
Loading…
Reference in New Issue