place transformed StackParam nodes in the user Block
[libfirm] / ir / be / belower.c
index db07734..b26d4ab 100644 (file)
 #include "iredges_t.h"
 #include "irgwalk.h"
 
-#ifdef _WIN32
-#include <malloc.h>
-#else
-#include <alloca.h>
+#ifdef HAVE_MALLOC_H
+ #include <malloc.h>
+#endif
+#ifdef HAVE_ALLOCA_H
+ #include <alloca.h>
 #endif
 
 #undef is_Perm
@@ -508,7 +509,7 @@ static void gen_assure_different_pattern(ir_node *irn, be_irg_t *birg, ir_node *
        firm_dbg_module_t         *mod   = firm_dbg_register("firm.be.lower");
        const arch_register_class_t *cls = arch_get_irn_reg_class(arch_env, other_different, -1);
 
-       if (arch_irn_is_ignore(arch_env, other_different) || ! mode_is_datab(get_irn_mode(other_different))) {
+       if (arch_irn_is(arch_env, other_different, ignore) || ! mode_is_datab(get_irn_mode(other_different))) {
                DBG((mod, LEVEL_1, "ignore constraint for %+F because other_irn is ignore or not a datab node\n", irn));
                return;
        }
@@ -535,6 +536,7 @@ static void gen_assure_different_pattern(ir_node *irn, be_irg_t *birg, ir_node *
        }
        else {
                keep = be_new_CopyKeep_single(cls, birg->irg, block, cpy, irn, get_irn_mode(other_different));
+               be_node_set_reg_class(keep, 1, cls);
                edges_reroute(other_different, keep, birg->irg);
        }