Commit 14e009db authored by Christoph Mallon's avatar Christoph Mallon Committed by Christoph Mallon
Browse files

constbits: Always analyse normal (non-X, non-Phi) nodes, even if their block is unreachable.

Unanalysable nodes never get triggered again, if their block gets reachable.
So this bottom information causes wrong results at other nodes.

This does not make the overall result worse, because Phis correctly consider only inputs, whose control flow edge is taken, and X nodes consider reachability of their block.

This corrects opt/fehler289.c.
parent 0ba3dfb1
......@@ -259,15 +259,9 @@ result_unknown_X:
o = t;
}
} else if (mode_is_intb(m)) {
bitinfo *const b = get_bitinfo(get_nodes_block(irn));
DB((dbg, LEVEL_3, "transfer %+F\n", irn));
if (b == NULL || b->z == f) {
undefined:
z = get_mode_null(m);
o = get_mode_all_one(m);
} else if (is_Phi(irn)) {
if (is_Phi(irn)) {
ir_node *const block = get_nodes_block(irn);
z = get_mode_null(m);
......@@ -300,7 +294,10 @@ undefined:
switch (get_irn_opcode(irn)) {
case iro_Bad:
goto undefined;
undefined:
z = get_mode_null(m);
o = get_mode_all_one(m);
break;
case iro_Const: {
z = o = get_Const_tarval(irn);
......
Markdown is supported
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