+ ir_instruction *ir = (ir_instruction *)n;
+
+ if (ir->ir_type == ir_type_return ||
+ ir->ir_type == ir_type_loop_jump)
+ return NULL;
+
+ /* So far, this code doesn't know how to look inside of flow
+ * control to see if a discard later on at this level is
+ * unconditional.
+ */
+ if (ir->ir_type == ir_type_if ||
+ ir->ir_type == ir_type_loop)
+ return NULL;
+
+ ir_discard *discard = ir->as_discard();
+ if (discard != NULL && discard->condition == NULL)
+ return discard;