nir: preserve all metadata when nir_opt_vectorize doesn't make progress
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>
This commit is contained in:
parent
54df09c8d4
commit
e26328582a
|
@ -420,9 +420,12 @@ nir_opt_vectorize_impl(struct nir_shader *nir, nir_function_impl *impl,
|
|||
bool progress = vectorize_block(nir, nir_start_block(impl), instr_set,
|
||||
filter, data);
|
||||
|
||||
if (progress)
|
||||
if (progress) {
|
||||
nir_metadata_preserve(impl, nir_metadata_block_index |
|
||||
nir_metadata_dominance);
|
||||
} else {
|
||||
nir_metadata_preserve(impl, nir_metadata_all);
|
||||
}
|
||||
|
||||
vec_instr_set_destroy(instr_set);
|
||||
return progress;
|
||||
|
|
Loading…
Reference in New Issue