nir/algebraic: extend lowering patterns for conversions on smaller bit sizes
authorIsabella Basso <isabellabdoamaral@usp.br>
Fri, 10 Mar 2023 20:20:09 +0000 (17:20 -0300)
committerMarge Bot <emma+marge@anholt.net>
Sat, 11 Mar 2023 17:21:37 +0000 (17:21 +0000)
commit79c94ef52ef23a10bea02525ef4bcf60675f2b4f
tree93989bc09ba1d00425fe8b30335f026172258fe7
parenta27bcd63d0bcde0e08197b1ac0b36c6c132af06c
nir/algebraic: extend lowering patterns for conversions on smaller bit sizes

Conversions on smaller bit sizes should also be collapsed when composed.

This also adds more patterns on the
intS -> intB -> floatB ==> intS -> floatB
lowering so as to deal with any int size C > B instead of a fixed intB.

Closes: #7776
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Signed-off-by: Isabella Basso <isabellabdoamaral@usp.br>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20965>
src/compiler/nir/nir_opt_algebraic.py