mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
aco: Don't eliminate exec write when it's used by a copy later.
Fixes: bc13049747
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10920>
This commit is contained in:
parent
5f8778a583
commit
c783293e47
1 changed files with 7 additions and 7 deletions
|
|
@ -294,17 +294,17 @@ void eliminate_useless_exec_writes_in_block(ssa_elimination_ctx& ctx, Block& blo
|
|||
if (!ctx.logical_phi_info[block.index].empty()) {
|
||||
exec_write_used = true;
|
||||
} else {
|
||||
bool will_insert_exec_copy = false;
|
||||
bool will_inserted_exec_copy_need_exec = false;
|
||||
bool copy_to_exec = false;
|
||||
bool copy_from_exec = false;
|
||||
|
||||
for (const auto& successor_phi_info : ctx.linear_phi_info[block.index]) {
|
||||
if (successor_phi_info.def.physReg() == exec)
|
||||
will_insert_exec_copy = true;
|
||||
if (successor_phi_info.op.physReg() == exec)
|
||||
will_inserted_exec_copy_need_exec = true;
|
||||
copy_to_exec |= successor_phi_info.def.physReg() == exec;
|
||||
copy_from_exec |= successor_phi_info.op.physReg() == exec;
|
||||
}
|
||||
|
||||
if (will_insert_exec_copy && !will_inserted_exec_copy_need_exec)
|
||||
if (copy_from_exec)
|
||||
exec_write_used = true;
|
||||
else if (copy_to_exec)
|
||||
exec_write_used = false;
|
||||
else
|
||||
/* blocks_incoming_exec_used is initialized to true, so this is correct even for loops. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue