Commit ba52718f authored by Matthias Braun's avatar Matthias Braun
Browse files

iropt: confirm(x, ==, b) => b

parent ee045568
......@@ -1666,6 +1666,12 @@ static ir_node *equivalent_node_Confirm(ir_node *n)
ir_node *pred = get_Confirm_value(n);
ir_relation relation = get_Confirm_relation(n);
/* Confirm(x, ==, b) => b
* Note: irconsconfirm.c has a shortcut for this case, but there may be
* cases where other localopts have to reveal this case first. */
if (relation == ir_relation_equal)
return pred;
while (is_Confirm(pred) && relation == get_Confirm_relation(pred)) {
/*
* rare case: two identical Confirms one after another,
......
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