aco: optimize swizzled SALU 8/16-bit conversions
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 29 May 2020 13:26:50 +0000 (14:26 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 30 Jul 2020 17:34:51 +0000 (17:34 +0000)
commit75a68eee282ad9174f823df931d18a4e9ea60fc3
tree65a893a0954f2fee80df5cf028132a0428bb70f4
parent80c135e6a6ade34f451e694d1c54598a75b1243e
aco: optimize swizzled SALU 8/16-bit conversions

We only need one s_bfe for a conversion with a swizzled source.

shader-db (parallel-rdp, Navi):
Totals from 487 (71.30% of 683) affected shaders:
SpillSGPRs: 3284 -> 3233 (-1.55%); split: -2.71%, +1.16%
SpillVGPRs: 2174 -> 2150 (-1.10%); split: -1.24%, +0.14%
CodeSize: 2497864 -> 2445544 (-2.09%); split: -2.11%, +0.01%
Instrs: 450613 -> 445104 (-1.22%); split: -1.27%, +0.05%

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/5259>
src/amd/compiler/aco_instruction_selection.cpp