mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
aco/ssa_elimination: check if pseudo scratch reg overwrittes regs used for v_cmpx opt
Cc: mesa-stable
Reviewed-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/27855>
(cherry picked from commit 482137402a)
This commit is contained in:
parent
e93dbb6df2
commit
343d1731ea
2 changed files with 8 additions and 1 deletions
|
|
@ -954,7 +954,7 @@
|
|||
"description": "aco/ssa_elimination: check if pseudo scratch reg overwrittes regs used for v_cmpx opt",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -398,6 +398,10 @@ try_optimize_branching_sequence(ssa_elimination_ctx& ctx, Block& block, const in
|
|||
regs_intersect(Definition(exec, ctx.program->lane_mask), def);
|
||||
}))
|
||||
break;
|
||||
|
||||
if (instr->isPseudo() && instr->pseudo().needs_scratch_reg &&
|
||||
regs_intersect(exec_copy_def, Definition(instr->pseudo().scratch_sgpr, s1)))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -437,6 +441,9 @@ try_optimize_branching_sequence(ssa_elimination_ctx& ctx, Block& block, const in
|
|||
for (const Definition& def : instr->definitions)
|
||||
if (regs_intersect(exec_copy_def, def))
|
||||
return;
|
||||
if (instr->isPseudo() && instr->pseudo().needs_scratch_reg &&
|
||||
regs_intersect(exec_copy_def, Definition(instr->pseudo().scratch_sgpr, s1)))
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if the instruction may implicitly read VCC, eg. v_cndmask or add with carry.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue