nir/lower_bit_size: optimize upcast of b2i8/b2i16
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 30 Oct 2020 15:18:25 +0000 (15:18 +0000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 4 Nov 2020 11:50:37 +0000 (11:50 +0000)
commit475077c790feeb0b677bd91107ac87711ca468aa
tree5dbfa96eb07204e3c703660fc8e3ca5c830b7ad1
parent4e5c85526b1c66a004d14e7b8ffa13b2bb0e706d
nir/lower_bit_size: optimize upcast of b2i8/b2i16

This also seems to be done by nir_opt_algebraic, but RADV will be moving
nir_lower_bit_size() to after that (so it doesn't create unsupported
8/16-bit instructions) and it doesn't seem worth creating a new pass just
for this simple optimization.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4791>
src/compiler/nir/nir_lower_bit_size.c