Commit 73600cee authored by yb9976's avatar yb9976
Browse files

Prevent optimization (x ^ y) & x -> ~y & x in case of multiple users.

parent 1a6c31ee
......@@ -4349,13 +4349,13 @@ static ir_node *transform_node_And(ir_node *n)
}
ir_node *x;
ir_node *y;
if (is_Eor(a) || is_Eor_Add(a)) {
if ((is_Eor(a) || is_Eor_Add(a)) && only_one_user(a)) {
x = b;
y = get_commutative_other_op(a, x);
if (y) /* (x ^ y) & x -> ~y & x */
goto absorb;
}
if (is_Eor(b) || is_Eor_Add(b)) {
if ((is_Eor(b) || is_Eor_Add(b)) && only_one_user(b)) {
x = a;
y = get_commutative_other_op(b, x);
if (y) {
......
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