projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e911bc
)
ast: swap range regardless of range_left >= 0
author
Eddie Hung
<eddie@fpgeh.com>
Mon, 4 May 2020 19:18:20 +0000
(12:18 -0700)
committer
Eddie Hung
<eddie@fpgeh.com>
Mon, 4 May 2020 19:18:20 +0000
(12:18 -0700)
frontends/ast/simplify.cc
patch
|
blob
|
history
diff --git
a/frontends/ast/simplify.cc
b/frontends/ast/simplify.cc
index 837c14ad773e3e700e5bc10e4523c2c5505f109e..cdb7e91e076757ca33fd931ac43ae99624a8cdc5 100644
(file)
--- a/
frontends/ast/simplify.cc
+++ b/
frontends/ast/simplify.cc
@@
-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;