nir: Rematerialize derefs in use blocks before repairing SSA
nir_repair_ssa_impl may insert phi nodes for any deref, but if the deref mode is uniform, validation fails. To fix this, rematerialize the derefs in the blocks they are used to avoid generating phi nodes for them. Cc: mesa-stable Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22536>
This commit is contained in:
committed by
Marge Bot
parent
cf323446e7
commit
ee2764d5e8
@@ -287,6 +287,7 @@ nir_lower_returns_impl(nir_function_impl *impl)
|
||||
|
||||
if (progress) {
|
||||
nir_metadata_preserve(impl, nir_metadata_none);
|
||||
nir_rematerialize_derefs_in_use_blocks_impl(impl);
|
||||
nir_repair_ssa_impl(impl);
|
||||
} else {
|
||||
nir_metadata_preserve(impl, nir_metadata_all);
|
||||
|
||||
Reference in New Issue
Block a user