From a9b3df51e026a4c5691cbd431d081ed9c7d16fe5 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 29 Jun 2022 14:13:38 +0100 Subject: [PATCH] aco/ra: update register file when updating phi definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit update_renames() fills in the wrong temp id. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Fixes: 302cb5c9001 ("aco/ra: remove some redundant code") Part-of: (cherry picked from commit 84f04fd0800384306347277c4e39524f0b295e34) --- .pick_status.json | 2 +- src/amd/compiler/aco_register_allocation.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 5fe4aabace5..e4d19ab376b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1282,7 +1282,7 @@ "description": "aco/ra: update register file when updating phi definition", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "302cb5c90015e2d3e139d575b3c7165519a21228" }, diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 1f1b52e1e22..589f28144d7 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -2012,6 +2012,7 @@ get_reg_phi(ra_ctx& ctx, IDSet& live_in, RegisterFile& register_file, if (prev_phi) { /* if so, just update that phi's register */ prev_phi->definitions[0].setFixed(pc.second.physReg()); + register_file.fill(prev_phi->definitions[0]); ctx.assignments[prev_phi->definitions[0].tempId()] = {pc.second.physReg(), pc.second.regClass()}; continue;