aco: remove dead code in handle_operands()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4260>
This commit is contained in:
parent
9f4ba2d2b4
commit
21ba2bc595
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue