Fixed width detection for part selects
authorClifford Wolf <clifford@clifford.at>
Mon, 28 Jul 2014 13:19:34 +0000 (15:19 +0200)
committerClifford Wolf <clifford@clifford.at>
Mon, 28 Jul 2014 13:19:34 +0000 (15:19 +0200)
frontends/ast/genrtlil.cc

index 5545fc16964407f114d195afeb04dcf6cf459e9f..9e1866832c76e31a9c8506f7de1eaf8cc028ea85 100644 (file)
@@ -599,8 +599,8 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint, bool *foun
                        } else
                                this_width = range->range_left - range->range_right + 1;
                        sign_hint = false;
-               } else
-                       width_hint = std::max(width_hint, this_width);
+               }
+               width_hint = std::max(width_hint, this_width);
                if (!id_ast->is_signed)
                        sign_hint = false;
                break;