Commit ee066a1b authored by yb9976's avatar yb9976
Browse files

Added missing check to prevent exchanging a node with itself.

This fixes opt/fehler284.c.
parent 08735a9d
......@@ -228,7 +228,7 @@ static int reassoc_commutative(ir_node **node)
return 0;
}
if (l == c1) {
if (l == c1 && r != c1) {
/* convert x .OP. (x .OP. y) => y .OP. (x .OP. x) */
dbg_info *dbgi = get_irn_dbg_info(n);
ir_mode *mode_res = get_irn_mode(n);
......
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