summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRhys Perry <pendingchaos02@gmail.com>2023-02-23 17:09:40 +0000
committerEric Engestrom <eric@engestrom.ch>2023-03-08 18:00:13 +0000
commitf4fc1e0d59b6f14275c078dc1abde95bd5e6ef40 (patch)
treef06004cdbce2092f9cc2569bd6ae26600f19f8ea
parent281bf4bc7d90f6591081e564cc7c456e9548364f (diff)
downloadmesa-f4fc1e0d59b6f14275c078dc1abde95bd5e6ef40.tar.gz
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 <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8349 Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21501> (cherry picked from commit 75d9a4a6ce5957803963a1df2c18b34991c62506)
-rw-r--r--.pick_status.json2
-rw-r--r--src/amd/compiler/aco_register_allocation.cpp7
2 files changed, 3 insertions, 6 deletions
diff --git a/.pick_status.json b/.pick_status.json
index ee80abe0684..9d9fe48d1cc 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -5287,7 +5287,7 @@
"description": "aco: always update orig_names in get_reg_phi()",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp
index c59c6353815..83d19656de1 100644
--- a/src/amd/compiler/aco_register_allocation.cpp
+++ b/src/amd/compiler/aco_register_allocation.cpp
@@ -2078,11 +2078,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