Without parsing the text of a ASM node it is not possible to decide whether two
ASM nodes are congruent. Don't even try it.
This fixes testsuite/opt/comboattrs.c
[r28422]
ir_entity *ent; /**< For Sel Nodes, its entity */
int intVal; /**< For Conv/Div Nodes: strict/remainderless */
unsigned uintVal;/**< for Builtin: the kind */
ir_entity *ent; /**< For Sel Nodes, its entity */
int intVal; /**< For Conv/Div Nodes: strict/remainderless */
unsigned uintVal;/**< for Builtin: the kind */
- ir_node *block; /**< for Block: itself */
+ ir_node *irn; /**< for nodes that never be construent: the node itself */
void *ptr; /**< generic pointer for hash/cmp */
} u;
};
void *ptr; /**< generic pointer for hash/cmp */
} u;
};
key.u.intVal = get_Div_no_remainder(irn);
break;
case iro_Block:
key.u.intVal = get_Div_no_remainder(irn);
break;
case iro_Block:
+ case iro_ASM:
+ key.u.irn = irn;
break;
case iro_Builtin:
key.u.intVal = get_Builtin_kind(irn);
break;
case iro_Builtin:
key.u.intVal = get_Builtin_kind(irn);
assert(key.u.intVal == get_Div_no_remainder(irn));
break;
case iro_Block:
assert(key.u.intVal == get_Div_no_remainder(irn));
break;
case iro_Block:
- assert(key.u.block == irn);
+ case iro_ASM:
+ assert(key.u.irn == irn);
break;
case iro_Builtin:
assert(key.u.intVal == (int)get_Builtin_kind(irn));
break;
case iro_Builtin:
assert(key.u.intVal == (int)get_Builtin_kind(irn));
* We fix it by never letting blocks be congruent
* which cannot be detected by combo either.
*/
* We fix it by never letting blocks be congruent
* which cannot be detected by combo either.
*/
+ key.u.irn = irn;
+ break;
+ case iro_ASM:
+ /*
+ * If is difficult to detect when two ASM nodes are congruent: even
+ * if the assembler "text" is identical, the instruction might
+ * have a side effect like flag toggle or function call.
+ * So, do not even try it.
+ *
+ */
+ key.u.irn = irn;
break;
case iro_Builtin:
key.u.intVal = get_Builtin_kind(irn);
break;
case iro_Builtin:
key.u.intVal = get_Builtin_kind(irn);