From: Michael Beck Date: Mon, 8 May 2006 12:07:45 +0000 (+0000) Subject: Do not create Confirm nodes for Cmp(Const, Const) constructs. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=323a1c9bb3e6ca6b0197f6863679693f65590419;p=libfirm Do not create Confirm nodes for Cmp(Const, Const) constructs. These are useless (and rather strange). [r7700] --- diff --git a/ir/ana/irconsconfirm.c b/ir/ana/irconsconfirm.c index ff21aaaa5..8eb0d7582 100644 --- a/ir/ana/irconsconfirm.c +++ b/ir/ana/irconsconfirm.c @@ -98,7 +98,7 @@ static void handle_if(ir_node *block, ir_node *cmp, pn_Cmp pnc, env_t *env) { ir_node *left = get_Cmp_left(cmp); ir_node *right = get_Cmp_right(cmp); - ir_op *op; + ir_op *op; const ir_edge_t *edge, *next; /* Beware of Bads */ @@ -107,6 +107,11 @@ static void handle_if(ir_node *block, ir_node *cmp, pn_Cmp pnc, env_t *env) op = get_irn_op(left); + /* Do not create Confirm nodes for Cmp(Const, Const) constructs. + These are removed anyway */ + if (op == op_Const && is_Const(right)) + return; + /* try to place the constant on the right side for a Confirm */ if (op == op_Const || op == op_SymConst) { ir_node *t = left;