Internals: Assert dtype comparison. No functional change intended.
This commit is contained in:
parent
c43e707f43
commit
f9164ab0d2
|
|
@ -1083,6 +1083,9 @@ bool AstNode::sameTreeIter(const AstNode* node1p, const AstNode* node2p, bool ig
|
|||
if (!node1p || !node2p) return false;
|
||||
if (node1p->type() != node2p->type()) return false;
|
||||
if (node1p->dtypep() != node2p->dtypep()) return false;
|
||||
UASSERT_OBJ(
|
||||
(!node1p->dtypep() && !node2p->dtypep()) || (node1p->dtypep() && node2p->dtypep()), node1p,
|
||||
"Comparison of a node with dtypep() with a node without dtypep()\n-node2=" << node2p);
|
||||
if (!node1p->same(node2p) || (gateOnly && !node1p->isGateOptimizable())) return false;
|
||||
return (sameTreeIter(node1p->m_op1p, node2p->m_op1p, false, gateOnly)
|
||||
&& sameTreeIter(node1p->m_op2p, node2p->m_op2p, false, gateOnly)
|
||||
|
|
|
|||
Loading…
Reference in New Issue