From 396be00640eec91191085f0d293957a35388c0b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 28 Jan 2020 12:32:09 +0100 Subject: [PATCH] aco: fix combine_salu_not_bitwise() when SCC is used Previously, we didn't use the SCC bit, and thus, we didn't care about it. With 'aco: Transform uniform bitwise instructions to 32-bit if possible.' that changed, so that we have to handle it. Fixes: 8a32f57fff56b3b94f1b5589feba38016f39427c ('aco: Transform uniform bitwise instructions to 32-bit if possible.') Reviewed-by: Rhys Perry Tested-by: Marge Bot Part-of: --- src/amd/compiler/aco_optimizer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index 93d934c69ed..9e606c880f4 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -1810,6 +1810,7 @@ bool combine_salu_not_bitwise(opt_ctx& ctx, aco_ptr& instr) /* create instruction */ std::swap(instr->definitions[0], op2_instr->definitions[0]); + std::swap(instr->definitions[1], op2_instr->definitions[1]); ctx.uses[instr->operands[0].tempId()]--; ctx.info[op2_instr->definitions[0].tempId()].label = 0; -- 2.30.2