- if(is_optimizable_node(node)) {
- int i;
- int arity = get_irn_arity(node);
- int costs = 0;
-
- for(i = 0; i < arity; ++i) {
- ir_node *pred = get_irn_n(node, i);
- costs += get_conv_costs(pred, dest_mode);
+#if 0 // TODO
+ /* Take the minimum of the conversion costs for Phi predecessors as only one
+ * branch is actually executed at a time */
+ if (is_Phi(node)) {
+ size_t i;
+ size_t arity = get_Phi_n_preds(node);
+ int costs;
+
+ costs = get_conv_costs(get_Phi_pred(node, 0), dest_mode);
+ for (i = 1; i < arity; ++i) {
+ ir_node *pred = get_Phi_pred(node, i);
+ int c = get_conv_costs(pred, dest_mode);
+ if (c < costs) costs = c;