mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-26 12:46:00 +00:00
[APInt] Add an assert to check for divide by zero in udivrem. NFC
udiv and urem already had the same assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302931 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e2c79618d4
commit
b09b50cbe4
@ -1662,6 +1662,7 @@ void APInt::udivrem(const APInt &LHS, const APInt &RHS,
|
||||
// Get some size facts about the dividend and divisor
|
||||
unsigned lhsWords = getNumWords(LHS.getActiveBits());
|
||||
unsigned rhsWords = getNumWords(RHS.getActiveBits());
|
||||
assert(rhsWords && "Performing divrem operation by zero ???");
|
||||
|
||||
// Check the degenerate cases
|
||||
if (lhsWords == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user