From: Eddie Hung Date: Tue, 31 Mar 2020 18:52:14 +0000 (-0700) Subject: ast: simplify to fully populate dynamic slicing case transformation X-Git-Tag: working-ls180~696^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5132f4099b0a09b542cdb32c3bcdee24917ca5f1;p=yosys.git ast: simplify to fully populate dynamic slicing case transformation --- diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 04c02d893..073b9cbbe 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -1727,7 +1727,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, } did_something = true; newNode = new AstNode(AST_CASE, shift_expr); - for (int i = 0; i <= source_width-result_width; i++) { + for (int i = 0; i < source_width; i++) { int start_bit = children[0]->id2ast->range_right + i; AstNode *cond = new AstNode(AST_COND, mkconst_int(start_bit, true)); AstNode *lvalue = children[0]->clone();