aco/ra: disallow s_cmpk with scc operand

Fixes: 2d6b0a4177 ("aco/optimizer: Optimize SOPC with literal to SOPK.")

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:38:46 +01:00
committed by Marge Bot
parent fe0c72caec
commit 0b9e2a5427
@@ -2091,6 +2091,7 @@ 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;
default:
// TODO: there are more instructions with restrictions on registers
return true;