r600/sfn: Never consider an op with register dest as dead

Another hot-fix: when a local register is written to, it is
actually unlikely that the value is never used, so just make
sure that this is never done.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17484>
This commit is contained in:
Gert Wollny 2022-07-11 20:09:59 +02:00
parent 8222840e3f
commit 0b0a04635b

View file

@ -128,7 +128,8 @@ void DCEVisitor::visit(AluInstr *instr)
if (instr->has_instr_flag(Instr::dead))
return;
if (instr->dest() && instr->dest()->has_uses()) {
if (instr->dest() &&
(instr->dest()->has_uses() || !instr->dest()->is_ssa()) ) {
sfn_log << SfnLog::opt << " dest used\n";
return;
}