- if(nodes_interfere(chordal_env, phi, arg)) {
- /* Insert a duplicate in arguments block,
- * make it the new phi arg,
- * set its register,
- * insert it into schedule,
- * pin it
- */
- ir_node *dupl = be_new_Copy(cls, chordal_env->irg, arg_block, arg);
- assert(get_irn_mode(phi) == get_irn_mode(dupl));
+ if (phi_reg == arg_reg
+ || (arg_reg->type & arch_register_type_joker)
+ || (arg_reg->type & arch_register_type_virtual)) {
+ /* Phi and arg have the same register, so pin and continue */
+ pin_irn(arg, phi_block);
+ DBG((dbg, LEVEL_1, " arg has same reg: pin %+F(%s)\n", arg, arch_get_irn_register(arg)->name));
+ continue;
+ }
+
+ if (be_values_interfere(lv, phi, arg)) {
+ ir_node *schedpoint;
+
+ /*
+ Insert a duplicate in arguments block,
+ make it the new phi arg,
+ set its register,
+ insert it into schedule,
+ pin it
+ */
+ ir_node *dupl = be_new_Copy(cls, arg_block, arg);
+