Commit cceaeb0d authored by Matthias Braun's avatar Matthias Braun
Browse files

Revert reversion of r28379. Maybe this way it's clear why the assert was wrong.

[r28387]
parent ef7ac8ee
...@@ -290,8 +290,12 @@ static void check_opcode(const partition_t *Z) ...@@ -290,8 +290,12 @@ static void check_opcode(const partition_t *Z)
key.u.intVal = get_Conv_strict(irn); key.u.intVal = get_Conv_strict(irn);
break; break;
case iro_Div: case iro_Div:
key.mode = get_Div_resmode(irn);
key.u.intVal = get_Div_no_remainder(irn); key.u.intVal = get_Div_no_remainder(irn);
break; break;
case iro_Mod:
key.mode = get_Mod_resmode(irn);
break;
case iro_Block: case iro_Block:
key.u.block = irn; key.u.block = irn;
break; break;
...@@ -307,32 +311,41 @@ static void check_opcode(const partition_t *Z) ...@@ -307,32 +311,41 @@ static void check_opcode(const partition_t *Z)
first = 0; first = 0;
} else { } else {
assert((unsigned)key.code == get_irn_opcode(irn)); assert((unsigned)key.code == get_irn_opcode(irn));
assert(key.mode == get_irn_mode(irn));
assert(key.arity == get_irn_arity(irn)); assert(key.arity == get_irn_arity(irn));
switch (get_irn_opcode(irn)) { switch (get_irn_opcode(irn)) {
case iro_Proj: case iro_Proj:
assert(key.mode == get_irn_mode(irn));
assert(key.u.proj == get_Proj_proj(irn)); assert(key.u.proj == get_Proj_proj(irn));
break; break;
case iro_Sel: case iro_Sel:
assert(key.mode == get_irn_mode(irn));
assert(key.u.ent == get_Sel_entity(irn)); assert(key.u.ent == get_Sel_entity(irn));
break; break;
case iro_Conv: case iro_Conv:
assert(key.mode == get_irn_mode(irn));
assert(key.u.intVal == get_Conv_strict(irn)); assert(key.u.intVal == get_Conv_strict(irn));
break; break;
case iro_Div: case iro_Div:
assert(key.mode == get_Div_resmode(irn));
assert(key.u.intVal == get_Div_no_remainder(irn)); assert(key.u.intVal == get_Div_no_remainder(irn));
break; break;
case iro_Mod:
assert(key.mode == get_Mod_resmode(irn));
break;
case iro_Block: case iro_Block:
assert(key.mode == get_irn_mode(irn));
assert(key.u.block == irn); assert(key.u.block == irn);
break; break;
case iro_Load: case iro_Load:
assert(key.mode == get_Load_mode(irn)); assert(key.mode == get_Load_mode(irn));
break; break;
case iro_Builtin: case iro_Builtin:
assert(key.mode == get_irn_mode(irn));
assert(key.u.intVal == (int) get_Builtin_kind(irn)); assert(key.u.intVal == (int) get_Builtin_kind(irn));
break; break;
default: default:
assert(key.mode == get_irn_mode(irn));
break; break;
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment