Commit 2e451cd6 authored by Matthias Braun's avatar Matthias Braun
Browse files

new localopt: Cmp(Eor(x,y),0) <=> Cmp(x,y) for the Equals and NotEquals case

[r27948]
parent 2525d4c5
......@@ -4440,6 +4440,13 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj)
}
}
}
/* Cmp(Eor(x, y), 0) <=> Cmp(x, y) at least for the ==0,!=0
* cases */
if (is_Const(right) && is_Const_null(right) && is_Eor(left)) {
right = get_Eor_right(left);
left = get_Eor_left(left);
changed |= 1;
}
} /* mode_is_int(...) */
} /* proj_nr == pn_Cmp_Eq || proj_nr == pn_Cmp_Lg */
......
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