aco/ra: don't write to scc/ttmp with s_fmac

Fixes: 4bd229ac50 ("aco/gfx11.5: select SOP2 float instructions")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32545>
This commit is contained in:
Georg Lehmann 2024-12-10 16:51:53 +01:00 committed by Marge Bot
parent 0b9e2a5427
commit 65506e635b

View file

@ -2091,7 +2091,14 @@ operand_can_use_reg(amd_gfx_level gfx_level, aco_ptr<Instruction>& instr, unsign
gfx_level >= GFX10); /* sdata can be vcc */
case Format::MUBUF:
case Format::MTBUF: return idx != 2 || gfx_level < GFX12 || reg != scc;
case Format::SOPK: return idx != 0 || reg != scc;
case Format::SOPK:
if (idx == 0 && reg == scc)
return false;
FALLTHROUGH;
case Format::SOP2:
case Format::SOP1:
return get_op_fixed_to_def(instr.get()) != (int)idx ||
is_sgpr_writable_without_side_effects(gfx_level, reg);
default:
// TODO: there are more instructions with restrictions on registers
return true;