mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-27 10:55:51 +00:00
Merge pull request #2027 from YosysHQ/eddie/verilog_neg_upto
ast: swap range regardless of range_left >= 0
This commit is contained in:
commit
ee0beb481d
4 changed files with 35 additions and 8 deletions
|
@ -1080,7 +1080,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
|
|||
}
|
||||
if (old_range_valid != range_valid)
|
||||
did_something = true;
|
||||
if (range_valid && range_left >= 0 && range_right > range_left) {
|
||||
if (range_valid && range_right > range_left) {
|
||||
int tmp = range_right;
|
||||
range_right = range_left;
|
||||
range_left = tmp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue