summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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