Commit 323a1c9b authored by Michael Beck's avatar Michael Beck
Browse files

Do not create Confirm nodes for Cmp(Const, Const) constructs.

These are useless (and rather strange).

[r7700]
parent 09de6795
......@@ -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;
......
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