forked from github/verilator
DFG: fix REPLACE_EQ_OF_CONST_AND_CONST peephole pattern
This commit is contained in:
parent
cd2a5771b8
commit
17976d7401
@ -610,9 +610,7 @@ class V3DfgPeephole final : public DfgVisitor {
|
||||
if (DfgConst* const rhsConstp = rhsp->cast<DfgConst>()) {
|
||||
APPLYING(REPLACE_EQ_OF_CONST_AND_CONST) {
|
||||
DfgConst* const replacementp = makeZero(vtxp->fileline(), 1);
|
||||
if (lhsConstp->constp()->sameTree(rhsConstp->constp())) {
|
||||
replacementp->num().setLong(1);
|
||||
}
|
||||
replacementp->num().opEq(lhsConstp->num(), rhsConstp->num());
|
||||
vtxp->replaceWith(replacementp);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user