- don't dump alignment 0
[libfirm] / ir / opt / reassoc.c
index 2bdac4f..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));
@@ -749,10 +750,6 @@ void optimize_reassociation(ir_graph *irg)
        assert(get_irg_pinned(irg) != op_pin_state_floats &&
                "Reassociation needs pinned graph to work properly");
 
-       /* reassociation needs constant folding */
-       if (!get_opt_reassociation() || !get_opt_constant_folding())
-               return;
-
        rem = current_ir_graph;
        current_ir_graph = irg;