diff --git a/src/glsl/nir/nir_opt_remove_phis.c b/src/glsl/nir/nir_opt_remove_phis.c index 7896584b4e4..b5296f14411 100644 --- a/src/glsl/nir/nir_opt_remove_phis.c +++ b/src/glsl/nir/nir_opt_remove_phis.c @@ -92,6 +92,11 @@ remove_phis_impl(nir_function_impl *impl) nir_foreach_block(impl, remove_phis_block, &progress); + if (progress) { + nir_metadata_preserve(impl, nir_metadata_block_index | + nir_metadata_dominance); + } + return progress; }