Optimizer: Put constants on left side of compares to match other AstBiOps and extend optimizations. No runtime result change intended.

This commit is contained in:
Wilson Snyder
2014-03-09 17:13:37 -04:00
parent 45bbae80e7
commit dce4519995
4 changed files with 40 additions and 31 deletions
+3 -3
View File
@@ -225,9 +225,9 @@ private:
constwidthp->dtypeFrom (nodep->rhsp()); // unsigned
AstCond* newp =
new AstCond (nodep->fileline(),
new AstLte (nodep->fileline(),
nodep->rhsp()->cloneTree(false),
constwidthp),
new AstGte (nodep->fileline(),
constwidthp,
nodep->rhsp()->cloneTree(false)),
nodep,
constzerop);
replaceHandle.relink(newp);