summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_opt_undef.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_opt_undef.c')
-rw-r--r--src/compiler/nir/nir_opt_undef.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_opt_undef.c b/src/compiler/nir/nir_opt_undef.c
index c26158dab7e..bdebf5540d6 100644
--- a/src/compiler/nir/nir_opt_undef.c
+++ b/src/compiler/nir/nir_opt_undef.c
@@ -154,10 +154,15 @@ nir_opt_undef(nir_shader *shader)
}
}
- if (progress)
+ if (progress) {
nir_metadata_preserve(function->impl,
nir_metadata_block_index |
nir_metadata_dominance);
+ } else {
+#ifndef NDEBUG
+ function->impl->valid_metadata &= ~nir_metadata_not_properly_reset;
+#endif
+ }
}
}