radeonsi: Only call nir_lower_var_copies at the end of the opt loop

In 283ad85944b5d, radeonsi started using nir_find_var_copies.  However,
it was also calling nir_lower_var_copies in the optimization loop and
the two can end up fighting.  The simple solution is to wait to lower
copies until the end of the optimization loop.

Fixes: 283ad85944b5d
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3550

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6841>
1 file changed