From 1c44129db30db70dc6a0e1906b5a8efa7f8d00cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Tue, 19 Nov 2019 13:38:34 +0100 Subject: [PATCH] aco: Don't skip combine_instruction when definitions[1] is used. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Timur Kristóf Reviewed-by: Daniel Schürmann --- src/amd/compiler/aco_optimizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index bf075b6ffab..84c5e4b78ab 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -2150,7 +2150,7 @@ bool apply_omod_clamp(opt_ctx &ctx, Block& block, aco_ptr& instr) void combine_instruction(opt_ctx &ctx, Block& block, aco_ptr& instr) { - if (instr->definitions.empty() || !ctx.uses[instr->definitions[0].tempId()]) + if (instr->definitions.empty() || is_dead(ctx.uses, instr.get())) return; if (instr->isVALU()) { -- 2.30.2