Commit 4afe0598 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

iropt: Check symmetric case of a op b == a, if this case failed.

parent a2cdfd49
......@@ -4197,6 +4197,7 @@ static ir_node *transform_node_Cmp(ir_node *n)
} else {
x = get_commutative_other_op(left, right);
}
if (x)
goto cmp_x_eq_0;
}
if (is_Add(right) || is_Eor(right) || is_Sub(right) || is_Or_Eor_Add(right)) {
......@@ -4205,8 +4206,8 @@ static ir_node *transform_node_Cmp(ir_node *n)
} else {
x = get_commutative_other_op(right, left);
}
cmp_x_eq_0:
if (x) {
cmp_x_eq_0:;
ir_graph *irg = get_irn_irg(n);
left = x;
right = create_zero_const(irg, mode);
......
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