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

Author: Rhys Perry <[email protected]>
Date:   Thu Feb 23 17:09:40 2023 +0000

aco: always update orig_names in get_reg_phi()

No idea why this wasn't done if pc.first was a renamed temporary.

Fixes navi10 RA validation error with
dEQP-VK.binding_model.descriptor_buffer.multiple.graphics_geom_buffers1_sets3_imm_samplers

Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8349
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21501>

---

 src/amd/compiler/aco_register_allocation.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/amd/compiler/aco_register_allocation.cpp 
b/src/amd/compiler/aco_register_allocation.cpp
index f5091ce0ac8..e8a1095de83 100644
--- a/src/amd/compiler/aco_register_allocation.cpp
+++ b/src/amd/compiler/aco_register_allocation.cpp
@@ -2082,11 +2082,8 @@ get_reg_phi(ra_ctx& ctx, IDSet& live_in, RegisterFile& 
register_file,
 
       /* rename */
       std::unordered_map<unsigned, Temp>::iterator orig_it = 
ctx.orig_names.find(pc.first.tempId());
-      Temp orig = pc.first.getTemp();
-      if (orig_it != ctx.orig_names.end())
-         orig = orig_it->second;
-      else
-         ctx.orig_names[pc.second.tempId()] = orig;
+      Temp orig = orig_it != ctx.orig_names.end() ? orig_it->second : 
pc.first.getTemp();
+      ctx.orig_names[pc.second.tempId()] = orig;
       ctx.renames[block.index][orig.id()] = pc.second.getTemp();
 
       /* otherwise, this is a live-in and we need to create a new phi

Reply via email to