nir_lower_bit_size: Support lowering ops with differing source/dest sizes
authorJesse Natalie <jenatali@microsoft.com>
Mon, 22 Jun 2020 18:51:09 +0000 (11:51 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 27 Aug 2020 16:57:42 +0000 (16:57 +0000)
commitea715741b5b31044d00959b61bbc96db913e958e
tree7d2d65f259871451e69858d09e907f87b84593b4
parent0d595f72b2ccea462d01923e02957f1458acdd35
nir_lower_bit_size: Support lowering ops with differing source/dest sizes

Specifically the bit-finding routines always return int32. Don't complain
about the dest already being 32 bits when lowering to 32 bits, and
don't bother casting the dest if it's already right.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6313>
src/compiler/nir/nir_lower_bit_size.c