From 0b9e2a542710726d05789e0a4fce4c3ffe77462d Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Tue, 10 Dec 2024 16:38:46 +0100 Subject: [PATCH] aco/ra: disallow s_cmpk with scc operand Fixes: 2d6b0a4177b ("aco/optimizer: Optimize SOPC with literal to SOPK.") Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_register_allocation.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 9600b92b121..75b06865959 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -2091,6 +2091,7 @@ operand_can_use_reg(amd_gfx_level gfx_level, aco_ptr& 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;