nir/opt_algebraic: Optimize open coded bfm.
authorGeorg Lehmann <dadschoorse@gmail.com>
Thu, 29 Sep 2022 15:36:55 +0000 (17:36 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 9 Dec 2022 14:59:16 +0000 (14:59 +0000)
commit4dff3ff005b47befd3e4a903b08d5b4bdbef6ae3
treee6e18ea1a85c882ffbbdece2dd4274f974746c89
parenta73e86e0a5eb58e2f25f7b7419a78c122cc5ab1a
nir/opt_algebraic: Optimize open coded bfm.

Foz-DB Navi21:
Totals from 1553 (1.15% of 134913) affected shaders:
SpillVGPRs: 2246 -> 2223 (-1.02%); split: -1.42%, +0.40%
CodeSize: 10409156 -> 10410720 (+0.02%); split: -0.03%, +0.04%
Instrs: 1899725 -> 1898773 (-0.05%); split: -0.07%, +0.02%
Latency: 71225814 -> 71118314 (-0.15%); split: -0.21%, +0.06%
InvThroughput: 13384926 -> 13330369 (-0.41%); split: -0.47%, +0.06%
VClause: 38309 -> 38284 (-0.07%); split: -0.17%, +0.11%
SClause: 70743 -> 70706 (-0.05%)
Copies: 167296 -> 167230 (-0.04%); split: -0.28%, +0.24%
Branches: 42446 -> 42444 (-0.00%); split: -0.01%, +0.00%
PreVGPRs: 95191 -> 95188 (-0.00%)

Some minor instructions count regressions in parallel-rdp
because v_bfm_b32 can't use SDWA, but overall an improvement.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18887>
src/compiler/nir/nir_opt_algebraic.py