Internals: Type check vertices made in DfgPeephole

This commit is contained in:
Geza Lore 2026-03-21 10:15:18 +00:00
parent fa30e0c9b5
commit 13cf9ba075
1 changed files with 3 additions and 0 deletions

View File

@ -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<Vertex, Operands...>(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