aco: don't create unnecessary addition in indirect get_sampler_desc()
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 3 Dec 2021 13:42:25 +0000 (13:42 +0000)
committerMarge Bot <emma+marge@anholt.net>
Thu, 9 Dec 2021 17:58:54 +0000 (17:58 +0000)
commit786d434397c2e3566404b5efe2492cd08e0e6c86
tree55bca192b06543b9341c18aa8842e01b5d7c8bf7
parent77db4e27b1814fb48036abe457d7fbe1a6965409
aco: don't create unnecessary addition in indirect get_sampler_desc()

I don't think this has any effect on GFX9+ because the addition is
combined into the load.

fossil-db (polaris10):
Totals from 12595 (9.29% of 135627) affected shaders:
SGPRs: 1054348 -> 1054860 (+0.05%); split: -0.02%, +0.07%
VGPRs: 667240 -> 667320 (+0.01%); split: -0.01%, +0.02%
CodeSize: 82761508 -> 82512816 (-0.30%); split: -0.30%, +0.00%
MaxWaves: 62182 -> 62181 (-0.00%)
Instrs: 16072934 -> 16010764 (-0.39%); split: -0.39%, +0.00%
Latency: 582819635 -> 582287964 (-0.09%); split: -0.13%, +0.04%
InvThroughput: 276460536 -> 276417613 (-0.02%); split: -0.06%, +0.05%
VClause: 261656 -> 261654 (-0.00%); split: -0.01%, +0.01%
SClause: 680952 -> 680854 (-0.01%); split: -0.05%, +0.04%
Copies: 1727202 -> 1727742 (+0.03%); split: -0.12%, +0.15%
Branches: 547050 -> 547033 (-0.00%); split: -0.01%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14043>
src/amd/compiler/aco_instruction_selection.cpp