summaryrefslogtreecommitdiff
path: root/src/amd/compiler/aco_optimizer.cpp
diff options
context:
space:
mode:
authorRhys Perry <pendingchaos02@gmail.com>2021-03-09 16:40:23 +0000
committerMarge Bot <emma+marge@anholt.net>2022-04-13 16:23:35 +0000
commitd957730b9bddc15092687b8d7db774ce79b7a0e7 (patch)
treebad5fcd90332309bf9aa16a8f5c788aaa68127a6 /src/amd/compiler/aco_optimizer.cpp
parent0360e12ebf7b3d29b038c6e188aa5761a4250fea (diff)
aco: use vcc for 64-bit vgpr addition
fossil-db (Sienna Cichlid): Totals from 229 (0.17% of 134621) affected shaders: CodeSize: 1520192 -> 1517644 (-0.17%) Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14124>
Diffstat (limited to 'src/amd/compiler/aco_optimizer.cpp')
-rw-r--r--src/amd/compiler/aco_optimizer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp
index b0d08774379..b55d64d3772 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<Instruction>& 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<Instruction>& 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())