mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02: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:8a32f57fffSigned-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> (cherry picked from commit8bd3fefb74)
This commit is contained in:
parent
2a74f0ceb6
commit
bfc05f365c
2 changed files with 4 additions and 2 deletions
|
|
@ -1930,7 +1930,7 @@
|
|||
"description": "aco/optimizer: Only set scc_needed when it is actually needed.",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "8a32f57fff56b3b94f1b5589feba38016f39427c"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2986,7 +2986,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