- implemented i_mapper_bswap()
[libfirm] / ir / be / belower.c
index 5327754..443bc43 100644 (file)
@@ -440,7 +440,7 @@ static void lower_perm_node(ir_node *irn, lower_env_t *env)
                                        arch_set_irn_register(res1, cycle.elems[i]);
 
                                        /* insert the copy/exchange node in schedule after the magic schedule node (see above) */
-                                       sched_add_after(sched_point, cpyxchg);
+                                       sched_add_after(skip_Proj(sched_point), cpyxchg);
 
                                        DB((dbg, LEVEL_1, "replacing %+F with %+F, placed new node after %+F\n", irn, cpyxchg, sched_point));
 
@@ -459,7 +459,7 @@ static void lower_perm_node(ir_node *irn, lower_env_t *env)
                                        exchange(res2, cpyxchg);
 
                                        /* insert the copy/exchange node in schedule after the magic schedule node (see above) */
-                                       sched_add_after(sched_point, cpyxchg);
+                                       sched_add_after(skip_Proj(sched_point), cpyxchg);
 
                                        /* set the new scheduling point */
                                        sched_point = cpyxchg;
@@ -549,7 +549,7 @@ static void gen_assure_different_pattern(ir_node *irn, ir_node *other_different,
        assert(sched_is_scheduled(irn) && "need schedule to assure constraints");
        if (! sched_is_scheduled(cpy))
                sched_add_before(skip_Proj(irn), cpy);
-       sched_add_after(irn, keep);
+       sched_add_after(skip_Proj(irn), keep);
 
        /* insert the other different and it's copies into the map */
        entry = ir_nodemap_get(op_set, other_different);