3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-04 16:44:07 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2024-10-28 17:50:53 -07:00
parent b0fef6429f
commit ecdfab81a6

View file

@ -2785,9 +2785,16 @@ br_status bv_rewriter::mk_eq_bv2int(expr* lhs, expr* rhs, expr_ref& result) {
result = m.mk_false();
return BR_REWRITE1;
}
if (m_util.is_bv2int(lhs, x) && m_util.is_bv2int(rhs, y)) {
if (m_util.is_bv2int(lhs, x) &&
m_util.is_bv2int(rhs, y)) {
auto szx = m_util.get_bv_size(x);
auto szy = m_util.get_bv_size(y);
if (szx < szy)
x = m_util.mk_zero_extend(szy - szx, x);
else if (szx > szy)
y = m_util.mk_zero_extend(szx - szy, y);
result = m.mk_eq(x, y);
return BR_REWRITE1;
return BR_REWRITE2;
}
return BR_FAILED;
}