nir/opt_move: fix handling of if-condition
authorDaniel Schürmann <daniel@schuermann.dev>
Tue, 15 Aug 2023 10:44:01 +0000 (12:44 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 22 Aug 2023 21:05:18 +0000 (21:05 +0000)
commit7e246f7f2bde0c859269c4b81505bd0887045e7b
tree3419245670d5aca22d2456fcafdaa33a00bd6745
parentf9e55341828897f691a45e9468c539c0652ade1f
nir/opt_move: fix handling of if-condition

By accident, this used the parent of the nir_src which is a nir_if
instead of the parent of the SSA value.

Totals from 10814 (8.10% of 133461) affected shaders: (GFX11)
Instrs: 21759185 -> 21757190 (-0.01%); split: -0.02%, +0.01%
CodeSize: 112320272 -> 112316008 (-0.00%); split: -0.02%, +0.01%
SpillSGPRs: 11220 -> 11212 (-0.07%)
SpillVGPRs: 911 -> 903 (-0.88%); split: -1.54%, +0.66%
Latency: 258334759 -> 258316073 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 31428650 -> 31426394 (-0.01%); split: -0.02%, +0.01%
VClause: 309119 -> 309090 (-0.01%); split: -0.01%, +0.01%
SClause: 657028 -> 657150 (+0.02%); split: -0.03%, +0.04%
Copies: 1434209 -> 1432420 (-0.12%); split: -0.28%, +0.15%
Branches: 481804 -> 481801 (-0.00%)
PreSGPRs: 829995 -> 829966 (-0.00%)
PreVGPRs: 758249 -> 758253 (+0.00%)

Fixes: 8a78706643ecad8a1f303cc9358873abc29978b4 ('nir: refactor nir_opt_move')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24695>
src/compiler/nir/nir_opt_move.c
src/gallium/drivers/zink/ci/traces-zink.yml