Mesa (main): aco/ra: update register file when updating phi definition

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 30 20:10:06 UTC 2022


Module: Mesa
Branch: main
Commit: 84f04fd0800384306347277c4e39524f0b295e34
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=84f04fd0800384306347277c4e39524f0b295e34

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Wed Jun 29 14:13:38 2022 +0100

aco/ra: update register file when updating phi definition

update_renames() fills in the wrong temp id.

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Fixes: 302cb5c9001 ("aco/ra: remove some redundant code")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17295>

---

 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 b9ed0c77371..6193e4bf600 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;



More information about the mesa-commit mailing list