Optimize e.g. {(b<<4)[7:4], (b<<4)[3:0]}. From assignmerge tree.

Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
This commit is contained in:
Jie Xu 2014-11-05 20:58:36 -05:00 committed by Wilson Snyder
parent 03100020ab
commit 4e2884b509

View File

@ -461,7 +461,7 @@ private:
if (!lhsp || !rhsp) return false;
AstNode* lfromp = lhsp->fromp();
AstNode* rfromp = rhsp->fromp();
if (!lfromp || !rfromp || !operandsSame(lfromp,rfromp)) return false;
if (!lfromp || !rfromp || !lfromp->sameGateTree(rfromp)) return false;
AstConst* lstart = lhsp->lsbp()->castConst();
AstConst* rstart = rhsp->lsbp()->castConst();
AstConst* lwidth = lhsp->widthp()->castConst();