nir: improve nir_lower_bit_size
With these changes, the pass should now create much less upcasts.
fossil-db changes (Navi, some uninteresting stats removed):
PERCENTAGE DELTAS Shaders VGPRs SpillVGPRs MaxWaves Instrs Cycles
parallel-rdp/small_subgroup 246 -0.62% . +0.38% -13.02% -7.82%
parallel-rdp/small_uber_subgroup 55 . +10.91% . -2.57% -2.72%
parallel-rdp/subgroup 327 . . . -0.01% -0.24%
parallel-rdp/uber_subgroup 55 . . . -0.03% -0.02%
----------------------------------------------------------------------------------------------------
All affected 218 -0.43% +5.57% +0.46% -7.17% -1.71%
----------------------------------------------------------------------------------------------------
Total 683 -0.20% +5.57% +0.14% -4.50% -1.68%
Based on !5259 (merged)
Edited by Rhys Perry