mirror of https://github.com/YosysHQ/yosys.git
ast: swap range regardless of range_left >= 0
This commit is contained in:
parent
2e911bc806
commit
e936ac61ea
|
@ -1079,7 +1079,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…
Reference in New Issue