Mesa (master): aco: fix WQM coalescing
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 14 16:44:28 UTC 2020
Module: Mesa
Branch: master
Commit: 66e3c74f9c7ffdd7687d4304238b50c3ba35ef47
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=66e3c74f9c7ffdd7687d4304238b50c3ba35ef47
Author: Daniel Schürmann <daniel at schuermann.dev>
Date: Thu May 14 12:40:55 2020 +0100
aco: fix WQM coalescing
get_reg_specified() doesn't handle special registers like SCC.
Fixes: a5fc96b533418dc2d68f17f3f19ac5f82d59b978 ('aco: coalesce parallelcopies during register allocation')
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5036>
---
src/amd/compiler/aco_register_allocation.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp
index a5c8ba784f4..613e55f0034 100644
--- a/src/amd/compiler/aco_register_allocation.cpp
+++ b/src/amd/compiler/aco_register_allocation.cpp
@@ -1864,7 +1864,9 @@ void register_allocation(Program *program, std::vector<TempSet>& live_out_per_bl
definition.setFixed(reg);
} else if (instr->opcode == aco_opcode::p_wqm || instr->opcode == aco_opcode::p_parallelcopy) {
PhysReg reg = instr->operands[i].physReg();
- if (get_reg_specified(ctx, register_file, definition.regClass(), parallelcopy, instr, reg))
+ if (instr->operands[i].isTemp() &&
+ instr->operands[i].getTemp().type() == definition.getTemp().type() &&
+ !register_file.test(reg, definition.bytes()))
definition.setFixed(reg);
} else if (instr->opcode == aco_opcode::p_extract_vector) {
PhysReg reg;
More information about the mesa-commit
mailing list