nir/opt_remove_phis: optimize out phis with undef

This removes some phis that loop unrolling can create.

fossil-db (Navi):
Totals from 349 (0.26% of 135946) affected shaders:
SpillSGPRs: 52 -> 41 (-21.15%)
CodeSize: 3179968 -> 3169920 (-0.32%); split: -0.33%, +0.01%
Instrs: 626965 -> 624712 (-0.36%); split: -0.37%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6348>
1 file changed