diff --git a/src/V3DfgPeephole.cpp b/src/V3DfgPeephole.cpp index c27607e21..7ed5ec3c8 100644 --- a/src/V3DfgPeephole.cpp +++ b/src/V3DfgPeephole.cpp @@ -610,9 +610,7 @@ class V3DfgPeephole final : public DfgVisitor { if (DfgConst* const rhsConstp = rhsp->cast()) { 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; }