+ /* the barrier also had the effect of a Keep for unused inputs.
+ * we now have to create an explicit Keep for them */
+ n_used = rbitset_popcount(used, arity);
+ if (n_used < (size_t) arity) {
+ int n_in = arity - (int) n_used;
+ ir_node **in = ALLOCAN(ir_node*, n_in);
+ int i = 0;
+ int n = 0;
+ ir_node *keep;
+
+ for (i = 0; i < arity; ++i) {
+ if (rbitset_is_set(used, i))
+ continue;
+ assert(n < n_in);
+ in[n++] = get_irn_n(irn, i);
+ }
+ keep = be_new_Barrier(get_nodes_block(irn), n_in, in);
+ keep_alive(keep);
+ sched_add_before(irn, keep);
+ }
+