mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
nir: Rematerialize derefs after opt_dead_cf
Adding `nir_rematerialize_derefs_in_use_blocks_impl` solves some cases when 'opt_dead_cf()' generates a phi instruction for the first argument of the `deref_store` intrinsic. Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Lionel Landwerlin's avatarLionel Landwerlin <lionel.g.landwerlin@intel.com> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6742 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22983>
This commit is contained in:
parent
fb8c48f4fc
commit
40042ed25a
1 changed files with 1 additions and 0 deletions
|
|
@ -397,6 +397,7 @@ opt_dead_cf_impl(nir_function_impl *impl)
|
|||
|
||||
if (progress) {
|
||||
nir_metadata_preserve(impl, nir_metadata_none);
|
||||
nir_rematerialize_derefs_in_use_blocks_impl(impl);
|
||||
|
||||
/* The CF manipulation code called by this pass is smart enough to keep
|
||||
* from breaking any SSA use/def chains by replacing any uses of removed
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue