+ costs = 0;
+ // The shift count does not participate in the conv optimisation
+ arity = is_Shl(node) ? 1 : get_irn_arity(node);
+ for (i = 0; i < arity; ++i) {
+ ir_node *pred = get_irn_n(node, i);
+ costs += imin(get_conv_costs(pred, dest_mode), 1);
+ }
+
+ return costs;
+}
+
+static ir_node *place_conv(ir_node *node, ir_mode *dest_mode)
+{
+ ir_node *block = get_nodes_block(node);
+ ir_node *conv = new_r_Conv(current_ir_graph, block, node, dest_mode);
+ return conv;