Bugfix: pattern for "x + (a - x)" fixed
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 23 Jun 2005 09:21:04 +0000 (09:21 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 23 Jun 2005 09:21:04 +0000 (09:21 +0000)
[r6110]

ir/ir/iropt.c

index fdc95f0..f76b12c 100644 (file)
@@ -841,7 +841,7 @@ static ir_node *equivalent_node_Add(ir_node *n)
     if (get_Sub_right(right) == left) {
       /* x + (a - x) */
 
-      n = get_Sub_left(left);
+      n = get_Sub_left(right);
       DBG_OPT_ALGSIM1(oldn, left, right, n, FS_OPT_ADD_SUB);
 
       return n;