From 59bbe2681b73c3795b7298e2486d5fde7c464ed5 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 2 Nov 2015 21:43:40 -0800 Subject: [PATCH] nir: Properly invalidate metadata in nir_opt_remove_phis(). Signed-off-by: Kenneth Graunke Reviewed-by: Jason Ekstrand Reviewed-by: Eduardo Lima Mitev Cc: mesa-stable@lists.freedesktop.org --- src/glsl/nir/nir_opt_remove_phis.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/glsl/nir/nir_opt_remove_phis.c b/src/glsl/nir/nir_opt_remove_phis.c index 5bdf7ef4da7..66d37544115 100644 --- a/src/glsl/nir/nir_opt_remove_phis.c +++ b/src/glsl/nir/nir_opt_remove_phis.c @@ -108,6 +108,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; } -- 2.30.2