never move around flag mofying nodes
authorMatthias Braun <matze@braunis.de>
Tue, 18 Sep 2007 15:06:49 +0000 (15:06 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 18 Sep 2007 15:06:49 +0000 (15:06 +0000)
[r15864]

ir/be/belower.c

index 3cbeec9..7ba31cf 100644 (file)
@@ -940,6 +940,11 @@ found_front:
                bitset_set(keep, nr);
                if (!is_Proj(op) && get_nodes_block(op) == bl
                                && (op == frontier || sched_comes_after(frontier, op))) {
+                       /* don't move around nodes that modifies the flags */
+                       if (arch_irn_is(aenv, op, modify_flags)) {
+                               continue;
+                       }
+
                        for (i = get_irn_arity(op) - 1; i >= 0; --i) {
                                ir_node *opop = get_irn_n(op, i);
                                if (!arch_irn_consider_in_reg_alloc(aenv, cls, opop)) {