Commit 2df87700 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Improve complement_values(): Consider Eor(x, c) and Eor(x, ~c).

parent 8890d457
......@@ -158,6 +158,10 @@ static bool complement_values(const ir_node *a, const ir_node *b)
if ((is_Not(a) && get_Not_op(a) == b) ||
(is_Not(b) && get_Not_op(b) == a))
return true;
if (is_Eor(a) && is_Eor(b) && get_Eor_left(a) == get_Eor_left(b)) {
a = get_Eor_right(a);
b = get_Eor_right(b);
}
if (is_Const(a) && is_Const(b)) {
ir_tarval *const tv_a = get_Const_tarval(a);
ir_tarval *const tv_b = get_Const_tarval(b);
......
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