bifrost: Add lowering for b2i32
authorChris Forbes <chrisforbes@google.com>
Sun, 26 Jul 2020 17:43:33 +0000 (10:43 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 27 Jul 2020 16:53:52 +0000 (16:53 +0000)
commitef781880eb3969620e19ba118410456e3ca300f6
tree64c7eeed007d39c8428ae8c35ac311adb81bb243
parent1a168c90a01d51582f992792b0caf902998de753
bifrost: Add lowering for b2i32

Since the bool representation is 0/~0, we can convert to int
just by &1.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6079>
src/panfrost/bifrost/bifrost_nir_algebraic.py