Commit 987260b3 authored by yb9976's avatar yb9976
Browse files

Do not set a node as its own operand.

This fixes opt/fehler314.c.
parent 9114e7bd
......@@ -370,8 +370,10 @@ static void handle_if(ir_node *block, ir_node *cmp, ir_relation rel, env_t *env)
if (rc == NULL)
rc = new_r_Confirm(block, right, left, rel);
set_irn_n(succ, pos, rc);
DB((dbg, LEVEL_2, "Replacing input %d of node %+F with %+F\n", pos, succ, rc));
if (succ != rc) {
set_irn_n(succ, pos, rc);
DB((dbg, LEVEL_2, "Replacing input %d of node %+F with %+F\n", pos, succ, rc));
}
env->num_confirms += 1;
}
......
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