nir_builder *b = &state->builder;
b->cursor = nir_after_cf_node_and_phis(node);
- if (nir_cursors_equal(b->cursor, nir_after_cf_list(state->cf_list)))
+ if (!state->loop && nir_cursors_equal(b->cursor, nir_after_cf_list(state->cf_list)))
return; /* Nothing to predicate */
assert(state->return_flag);
if (progress) {
nir_metadata_preserve(impl, nir_metadata_none);
nir_repair_ssa_impl(impl);
+ } else {
+#ifndef NDEBUG
+ impl->valid_metadata &= ~nir_metadata_not_properly_reset;
+#endif
}
return progress;