From d957730b9bddc15092687b8d7db774ce79b7a0e7 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 9 Mar 2021 16:40:23 +0000 Subject: [PATCH] aco: use vcc for 64-bit vgpr addition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit fossil-db (Sienna Cichlid): Totals from 229 (0.17% of 134621) affected shaders: CodeSize: 1520192 -> 1517644 (-0.17%) Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Reviewed-by: Timur Kristóf Part-of: --- src/amd/compiler/aco_optimizer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index b0d0877..b55d64d 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -1745,6 +1745,7 @@ label_instruction(opt_ctx& ctx, aco_ptr& instr) ctx.info[instr->operands[2].tempId()].set_vcc_hint(); break; + case aco_opcode::v_addc_co_u32: ctx.info[instr->operands[2].tempId()].set_vcc_hint(); break; case aco_opcode::v_cmp_lg_u32: if (instr->format == Format::VOPC && /* don't optimize VOP3 / SDWA / DPP */ instr->operands[0].constantEquals(0) && instr->operands[1].isTemp() && @@ -3675,8 +3676,9 @@ combine_instruction(opt_ctx& ctx, aco_ptr& instr) instr->opcode != aco_opcode::v_fma_mixlo_f16) return combine_vop3p(ctx, instr); - if (ctx.info[instr->definitions[0].tempId()].is_vcc_hint()) { - instr->definitions[0].setHint(vcc); + for (Definition& def : instr->definitions) { + if (ctx.info[def.tempId()].is_vcc_hint()) + def.setHint(vcc); } if (instr->isSDWA() || instr->isDPP()) -- 2.7.4