mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
aco/optimizer: Only set scc_needed when it is actually needed.
Not every p_cbranch uses the SCC, but our optimizer thought so.
Fixes: 8a32f57fff
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/7677>
This commit is contained in:
parent
a941618a1f
commit
8bd3fefb74
1 changed files with 3 additions and 1 deletions
|
|
@ -3235,7 +3235,9 @@ void select_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr)
|
|||
/* Mark SCC needed, so the uniform boolean transformation won't swap the definitions when it isn't beneficial */
|
||||
if (instr->format == Format::PSEUDO_BRANCH &&
|
||||
instr->operands.size() &&
|
||||
instr->operands[0].isTemp()) {
|
||||
instr->operands[0].isTemp() &&
|
||||
instr->operands[0].isFixed() &&
|
||||
instr->operands[0].physReg() == scc) {
|
||||
ctx.info[instr->operands[0].tempId()].set_scc_needed();
|
||||
return;
|
||||
} else if ((instr->opcode == aco_opcode::s_cselect_b64 ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue