Skip to content

Commit 78a08ce

Browse files
authored
Merge pull request diffblue#6137 from tautschnig/offset-arithmetic
bv_pointerst::offset_arithmetic: de-duplicate code
2 parents ac57e1b + 6a4731b commit 78a08ce

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/solvers/flattening/bv_pointers.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -809,13 +809,8 @@ bvt bv_pointerst::offset_arithmetic(
809809
{
810810
const std::size_t offset_bits = bv_pointers_width.get_offset_width(type);
811811

812-
bvt bv1 = offset_literals(bv, type);
813-
814-
bvt bv2=bv_utils.build_constant(x, offset_bits);
815-
816-
bvt tmp=bv_utils.add(bv1, bv2);
817-
818-
return object_offset_encoding(object_literals(bv, type), tmp);
812+
return offset_arithmetic(
813+
type, bv, 1, bv_utils.build_constant(x, offset_bits));
819814
}
820815

821816
bvt bv_pointerst::offset_arithmetic(

0 commit comments

Comments
 (0)