Skip to content

Commit e8ebba3

Browse files
authored
Merge pull request #8241 from tautschnig/cleanup/multiplier-invariant
Add invariant that multiplication uses operands of the same size
2 parents 1ca18f2 + f0b0aa2 commit e8ebba3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/solvers/flattening/bv_utils.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,11 @@ bvt bv_utilst::multiplier(
10711071
const bvt &op1,
10721072
representationt rep)
10731073
{
1074+
// We determine the result size from the operand size, and the implementation
1075+
// liberally swaps the operands, so we need to arrive at the same size
1076+
// whatever the order of the operands.
1077+
PRECONDITION(op0.size() == op1.size());
1078+
10741079
switch(rep)
10751080
{
10761081
case representationt::SIGNED: return signed_multiplier(op0, op1);

0 commit comments

Comments
 (0)