mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 11:20:20 +01:00
brw/copy: Don't remove instructions w/ conditional modifier
Fixes: 9e750f00c3 ("intel/brw: Make opt_copy_propagation_defs clean up its own trash")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31834>
This commit is contained in:
parent
d949d47f09
commit
8329c04521
1 changed files with 10 additions and 1 deletions
|
|
@ -1849,8 +1849,17 @@ brw_fs_opt_copy_propagation_defs(fs_visitor &s)
|
|||
if (source_progress) {
|
||||
instruction_progress = true;
|
||||
++uses_deleted[def->dst.nr];
|
||||
if (defs.get_use_count(def->dst) == uses_deleted[def->dst.nr])
|
||||
|
||||
/* We can copy propagate through an instruction like
|
||||
*
|
||||
* mov.nz.f0.0(8) %2:D, -%78:D
|
||||
*
|
||||
* but deleting the instruction may alter the program.
|
||||
*/
|
||||
if (def->conditional_mod == BRW_CONDITIONAL_NONE &&
|
||||
defs.get_use_count(def->dst) == uses_deleted[def->dst.nr]) {
|
||||
def->remove(defs.get_block(def->dst), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue