diff --git a/passes/techmap/alumacc.cc b/passes/techmap/alumacc.cc index 040569745..591c51c74 100644 --- a/passes/techmap/alumacc.cc +++ b/passes/techmap/alumacc.cc @@ -415,7 +415,7 @@ struct AlumaccWorker if (n == nullptr) { for (auto node : sig_alu[RTLIL::SigSig(B, A)]) - if (node->invert_b && node->c == State::S1) { + if (node->is_signed == is_signed && node->invert_b && node->c == State::S1) { n = node; cmp_less = !cmp_less; std::swap(A, B); @@ -460,7 +460,7 @@ struct AlumaccWorker if (n == nullptr) { for (auto node : sig_alu[RTLIL::SigSig(B, A)]) - if (node->invert_b && node->c == State::S1) { + if (node->is_signed == is_signed && node->invert_b && node->c == State::S1) { n = node; break; }