call optimize_cf() to delete dead-code that might arise after cond_eval
[libfirm] / ir / opt / reassoc.c
index 6fe4a68..8cfcd8c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -168,12 +168,13 @@ static int reassoc_Sub(ir_node **in)
                        /* already constant, nothing to do */
                        return 0;
                }
+
                mode = get_irn_mode(n);
                dbi  = get_irn_dbg_info(n);
 
                /* Beware of SubP(P, Is) */
                irn = new_rd_Minus(dbi, current_ir_graph, block, right, rmode);
-               irn = new_rd_Add(dbi, current_ir_graph, block, left, irn, get_irn_mode(n));
+               irn = new_rd_Add(dbi, current_ir_graph, block, left, irn, mode);
 
                DBG((dbg, LEVEL_5, "Applied: %n - %n => %n + (-%n)\n",
                        get_Sub_left(n), right, get_Sub_left(n), right));