Simplify the child match in dagnode_match.

I have no idea why I did it that way when all that's needed is to check the
child pointers. Well, that's modulo.r fixed :)
This commit is contained in:
Bill Currie 2012-11-22 21:23:46 +09:00
parent 64d9bbd230
commit 607d7dd45e
1 changed files with 1 additions and 4 deletions

View File

@ -275,10 +275,7 @@ dagnode_match (const dagnode_t *n, const daglabel_t *op,
if (n->label->opcode != op->opcode)
return 0;
for (i = 0; i < 3; i++) {
if (n->children[i] && children[i]
&& n->children[i]->label->op != children[i]->label->op )
return 0;
if ((!n->children[i]) ^ (!children[i]))
if (n->children[i] != children[i])
return 0;
}
return 1;