aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2020-03-23 20:44:27 +0000
committerMarge Bot <[email protected]>2020-03-24 11:28:55 +0000
commit21ba2bc595402180fa52d793bb1e524663788338 (patch)
treecb94872491d77d2504925a22291168f6948433ac /src/amd
parent9f4ba2d2b4a577a7cf6b38e835f0d1f39965bf08 (diff)
aco: remove dead code in handle_operands()
Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4260>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/compiler/aco_lower_to_hw_instr.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/amd/compiler/aco_lower_to_hw_instr.cpp b/src/amd/compiler/aco_lower_to_hw_instr.cpp
index c555ccdfa85..240f6c3a373 100644
--- a/src/amd/compiler/aco_lower_to_hw_instr.cpp
+++ b/src/amd/compiler/aco_lower_to_hw_instr.cpp
@@ -790,16 +790,13 @@ void handle_operands(std::map<PhysReg, copy_operation>& copy_map, lower_context*
return;
/* all target regs are needed as operand somewhere which means, all entries are part of a cycle */
- bool constants = false;
for (it = copy_map.begin(); it != copy_map.end(); ++it) {
assert(it->second.op.isFixed());
if (it->first == it->second.op.physReg())
continue;
- /* do constants later */
- if (it->second.op.isConstant()) {
- constants = true;
- continue;
- }
+
+ /* should already be done */
+ assert(!it->second.op.isConstant());
if (preserve_scc && it->second.def.getTemp().type() == RegType::sgpr)
assert(!(it->second.def.physReg() == pi->scratch_sgpr));
@@ -846,19 +843,6 @@ void handle_operands(std::map<PhysReg, copy_operation>& copy_map, lower_context*
}
}
}
-
- /* copy constants into a registers which were operands */
- if (constants) {
- for (it = copy_map.begin(); it != copy_map.end(); ++it) {
- if (!it->second.op.isConstant())
- continue;
- if (it->second.def.physReg() == scc) {
- bld.sopc(aco_opcode::s_cmp_lg_i32, Definition(scc, s1), Operand(0u), Operand(it->second.op.constantValue() ? 1u : 0u));
- } else {
- bld.copy(it->second.def, it->second.op);
- }
- }
- }
}
void lower_to_hw_instr(Program* program)