fix backend nodes not copying flags correctly
[libfirm] / ir / be / bestate.c
index 2a9b067..5a57bdd 100644 (file)
@@ -47,6 +47,7 @@
 #include "belive_t.h"
 #include "bemodule.h"
 #include "benode.h"
+#include "beirgmod.h"
 #include "bessaconstr.h"
 
 DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
@@ -182,7 +183,8 @@ static void spill_phi(minibelady_env_t *env, ir_node *phi)
        DBG((dbg, LEVEL_2, "\tcreate Phi-M for %+F\n", phi));
 
        /* create a Phi-M */
-       spill_info->spill = new_r_Phi(block, arity, in, mode_M);
+       spill_info->spill = be_new_Phi(block, arity, in, mode_M, NULL);
+       sched_add_after(block, spill_info->spill);
 
        if (spill_to_kill != NULL) {
                exchange(spill_to_kill, spill_info->spill);