mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 08:30:10 +01:00
aco/ssa_elimination: also optimize branching sequence with s_and without saveexec
insert_exec will start using this in the future, handle it the same just without the path to save exec before the v_cmpx instruction. No Foz-DB changes. Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31567>
This commit is contained in:
parent
68a372f6ce
commit
0338bb9ae8
1 changed files with 9 additions and 1 deletions
|
|
@ -337,7 +337,15 @@ try_optimize_branching_sequence(ssa_elimination_ctx& ctx, Block& block, const in
|
|||
const aco_opcode and_saveexec = ctx.program->lane_mask == s2 ? aco_opcode::s_and_saveexec_b64
|
||||
: aco_opcode::s_and_saveexec_b32;
|
||||
|
||||
if (exec_copy->opcode != and_saveexec && exec_copy->opcode != aco_opcode::p_parallelcopy)
|
||||
const aco_opcode s_and =
|
||||
ctx.program->lane_mask == s2 ? aco_opcode::s_and_b64 : aco_opcode::s_and_b32;
|
||||
|
||||
if (exec_copy->opcode != and_saveexec && exec_copy->opcode != aco_opcode::p_parallelcopy &&
|
||||
(exec_copy->opcode != s_and || exec_copy->operands[1].physReg() != exec))
|
||||
return;
|
||||
|
||||
/* The SCC def of s_and/s_and_saveexec must be unused. */
|
||||
if (exec_copy->opcode != aco_opcode::p_parallelcopy && !exec_copy->definitions[1].isKill())
|
||||
return;
|
||||
|
||||
/* Only allow SALU with multiple definitions. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue