From dde3dfd72e25bc1f166a8448fed2742c46b4aa71 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Sun, 15 Mar 2020 09:09:35 -0700 Subject: [PATCH] Update backends/btor/btor.cc; credit @boqwxp Co-Authored-By: Alberto Gonzalez <61295559+boqwxp@users.noreply.github.com> --- backends/btor/btor.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/btor/btor.cc b/backends/btor/btor.cc index d2bca8cd6..eabd870ab 100644 --- a/backends/btor/btor.cc +++ b/backends/btor/btor.cc @@ -433,8 +433,7 @@ struct BtorWorker if (cell->type == "$neg") btor_op = "neg"; log_assert(!btor_op.empty()); - int width = GetSize(cell->getPort(ID::Y)); - width = std::max(width, GetSize(cell->getPort(ID::A))); + int width = std::max(GetSize(cell->getPort(ID::A)), GetSize(cell->getPort(ID::Y))); bool a_signed = cell->hasParam("\\A_SIGNED") ? cell->getParam("\\A_SIGNED").as_bool() : false; -- 2.30.2