nir/opt_deref: Fix the vector bitcast optimization
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 8 Oct 2020 14:57:14 +0000 (09:57 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 8 Oct 2020 17:22:45 +0000 (12:22 -0500)
commit06a5edf247d509f1b82bc40b2007843e83e1d47a
treec45309a87509112632276092e9a8b1827b406c5e
parent54eae3355870d5b4ebf73f4690c1e72a2008779c
nir/opt_deref: Fix the vector bitcast optimization

It assumes the parent is a vector or scalar so we need to fail if it
isn't.

Fixes: 9190f82d573c "nir/opt_deref: Add an optimization for bitcasts"
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7064>
.gitlab-ci/piglit/cl.txt
src/compiler/nir/nir_deref.c