From 1619288a199569d49c89c1826590312e8ad7d161 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 7 Apr 2026 14:17:29 +0100 Subject: [PATCH] aco: ignore copykill+latekill operands in get_temp_reg_changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is possible with two vectors which share a temporary, though I don't think it currently happens in practice. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_live_var_analysis.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_live_var_analysis.cpp b/src/amd/compiler/aco_live_var_analysis.cpp index 0456eb39da4..dcc93385ffc 100644 --- a/src/amd/compiler/aco_live_var_analysis.cpp +++ b/src/amd/compiler/aco_live_var_analysis.cpp @@ -67,7 +67,7 @@ RegisterDemand get_temp_reg_changes(Instruction* instr) } for (Operand op : instr->operands) { - if (op.isFirstKillBeforeDef() || op.isCopyKill()) + if (op.isFirstKillBeforeDef() || (op.isCopyKill() && !op.isLateKill())) available_def_space -= op.getTemp(); else if (op.isClobbered() && !op.isKill()) available_def_space -= op.getTemp();