+static ir_node *
+new_bd_Psi (dbg_info *db, ir_node *block,
+ int arity, ir_node *cond[], ir_node *vals[], ir_mode *mode)
+{
+ ir_node **in;
+ ir_node *res;
+ ir_graph *irg = current_ir_graph;
+ int i;
+
+ NEW_ARR_A(ir_node *, in, 2 * arity + 1);
+
+ for (i = 0; i < arity; ++i) {
+ in[2 * i] = cond[i];
+ in[2 * i + 1] = vals[i];
+ }
+ in[2 * i] = vals[i];
+
+ res = new_ir_node(db, irg, block, op_Psi, mode, 2 * arity + 1, in);
+ assert(res);
+
+ res = optimize_node(res);
+ IRN_VRFY_IRG(res, irg);
+ return res;
+}
+