dzn: Run nir_opt_remove_phis before nir_lower_returns
authorJesse Natalie <jenatali@microsoft.com>
Tue, 9 May 2023 15:31:56 +0000 (08:31 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 9 May 2023 18:44:37 +0000 (18:44 +0000)
commitcd91387cadfd558347de47c0ca81f80dbd17494f
tree21f51756db4ff796a9c07d793ad4b5cd0f0f4431
parentca5bb27641b6645136b9a73a8930aba6e1bc0728
dzn: Run nir_opt_remove_phis before nir_lower_returns

Otherwise nir_lower_returns can produce invalid NIR by not updating
a phi in a non-trivial if.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22926>
src/microsoft/spirv_to_dxil/dxil_spirv_nir.c