From 203678acb6a642a5e3c5d8cd213c50ba47f69034 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 30 Jul 2025 14:48:57 +0100 Subject: [PATCH] aco/ra: set late-kill for operands of temporary p_create_vector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13543 Fixes: c279dd6e6141 ("aco: Support vector-aligned ops fixed to defs") Part-of: (cherry picked from commit 08f088479a40b2f8c76064f4f9939c53a6d03a9b) --- .pick_status.json | 2 +- src/amd/compiler/aco_register_allocation.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 63a40ac488a..6575947302d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -44,7 +44,7 @@ "description": "aco/ra: set late-kill for operands of temporary p_create_vector", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "c279dd6e61414c42731235167ff46441098b24f4", "notes": null diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 7c6d8835803..7f07f37cf3d 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -2366,6 +2366,8 @@ handle_vector_operands(ra_ctx& ctx, RegisterFile& register_file, for (unsigned i = 0; i < num_operands; i++) { vec->operands[i] = instr->operands[operand_index + i]; vec->operands[i].setFixed(ctx.assignments[vec->operands[i].tempId()].reg); + /* The operands might not be late-kill if they are tied to a definition. */ + vec->operands[i].setLateKill(true); } Temp vec_temp = ctx.program->allocateTmp(rc); ctx.assignments.emplace_back();