diff --git a/src/V3DfgPeephole.cpp b/src/V3DfgPeephole.cpp index a392d9547..993050db0 100644 --- a/src/V3DfgPeephole.cpp +++ b/src/V3DfgPeephole.cpp @@ -233,6 +233,9 @@ class V3DfgPeephole final : public DfgVisitor { Vertex* make(FileLine* flp, const DfgDataType& dtype, Operands... operands) { // Find or create an equivalent vertex Vertex* const vtxp = m_cache.getOrCreate(flp, dtype, operands...); + // Sanity check + UASSERT_OBJ(vtxp->dtype() == dtype, vtxp, "Vertex dtype mismatch"); + if (VL_UNLIKELY(v3Global.opt.debugCheck())) vtxp->typeCheck(m_dfg); // Add to work list addToWorkList(vtxp); // Return new node