Module: Mesa Branch: main Commit: 11712729eb837f093816028b5ec9802a03f6f6ed URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=11712729eb837f093816028b5ec9802a03f6f6ed
Author: Daniel Schürmann <[email protected]> Date: Mon Oct 4 11:03:14 2021 +0100 aco/optimizer: keep instr_mod_labels after applying extract This allows to use clamp on SDWA and VOP3 opsel instructions. Totals from 32 (0.02% of 134572) affected shaders: (GFX10.3) SpillVGPRs: 1783 -> 1780 (-0.17%); split: -0.50%, +0.34% CodeSize: 881480 -> 881496 (+0.00%); split: -0.15%, +0.15% Instrs: 154400 -> 154388 (-0.01%); split: -0.13%, +0.12% Latency: 5021791 -> 5033485 (+0.23%); split: -0.67%, +0.90% InvThroughput: 2486454 -> 2492312 (+0.24%); split: -0.67%, +0.91% VClause: 4763 -> 4755 (-0.17%); split: -0.52%, +0.36% Copies: 42866 -> 42965 (+0.23%); split: -0.25%, +0.48% Branches: 5640 -> 5639 (-0.02%) Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13576> --- src/amd/compiler/aco_optimizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index faa82fdf9e9..1e314ed9550 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -1030,9 +1030,9 @@ apply_extract(opt_ctx& ctx, aco_ptr<Instruction>& instr, unsigned idx, ssa_info& instr->vop3().opsel |= 1 << idx; } - /* label_vopc seems to be the only one worth keeping at the moment */ + /* output modifier and label_vopc seem to be the only one worth keeping at the moment */ for (Definition& def : instr->definitions) - ctx.info[def.tempId()].label &= label_vopc; + ctx.info[def.tempId()].label &= (label_vopc | instr_mod_labels); } void
