X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fcombo.c;h=448d2d6b66a1c69895b8c564f6b3ec4c723d8e6a;hb=2b7851654f662026548655434f80c7fce7f5de5a;hp=d1e3e0e7755f0abdd4ff235b16441040b58afcc6;hpb=65daf5bc390b02d68581f4c431dbdbfaae11b88f;p=libfirm diff --git a/ir/opt/combo.c b/ir/opt/combo.c index d1e3e0e77..448d2d6b6 100644 --- a/ir/opt/combo.c +++ b/ir/opt/combo.c @@ -2258,11 +2258,13 @@ static void compute_Cmp(node_t *node) } else if (r->part == l->part && !mode_is_float(get_irn_mode(l->node))) { tv = relation & ir_relation_equal ? tarval_b_true : tarval_b_false; - /* if the node was ONCE evaluated by all constants, but now + /* if the node was ONCE evaluated to a constant, but now this breaks AND we get from the argument partitions a different - result, switch to bottom. + result, ensure monotony by fall to bottom. This happens because initially all nodes are in the same partition ... */ - if (node->type.tv != tv) + if (node->type.tv == tarval_bottom) + tv = tarval_bottom; + else if (node->type.tv != tv && is_constant_type(node->type)) tv = tarval_bottom; node->type.tv = tv; } else { @@ -3251,7 +3253,9 @@ static void apply_result(ir_node *irn, void *ctx) node_t *block = get_irn_node(get_nodes_block(irn)); if (block->type.tv == tarval_unreachable) { - ir_node *bad = get_irg_bad(current_ir_graph); + ir_graph *irg = get_irn_irg(irn); + ir_mode *mode = get_irn_mode(node->node); + ir_node *bad = new_r_Bad(irg, mode); /* here, bad might already have a node, but this can be safely ignored as long as bad has at least ONE valid node */ @@ -3591,10 +3595,8 @@ void combo(ir_graph *irg) if (env.modified) { /* control flow might changed */ - set_irg_outs_inconsistent(irg); set_irg_extblk_inconsistent(irg); set_irg_doms_inconsistent(irg); - set_irg_loopinfo_inconsistent(irg); set_irg_entity_usage_state(irg, ir_entity_usage_not_computed); }