nir/copy_prop_vars: don't get confused by array_deref of vectors
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 8 Jan 2019 23:53:02 +0000 (15:53 -0800)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Sat, 23 Feb 2019 05:00:50 +0000 (21:00 -0800)
commit60d9bb9ff50b1bbaf917cc9fb40dbab71e180add
treeb5ac20ab4cfa89f37c90b0d4641d9707ef88deb5
parentf48527e51ac54d4f0ae0db3dbc1acd1c64eb70b4
nir/copy_prop_vars: don't get confused by array_deref of vectors

For now these derefs are not handled, so don't let these get into the
copies list -- which would cause wrong propagations.  For load_derefs,
do nothing.  For store_derefs, invalidate whatever the store is
writing to.  For copy_derefs, invalidate whatever the copy is writing
to.

These cases will happen once derefs to SSBOs/UBOs are kept around long
enough to get optimized by copy_prop_vars.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_opt_copy_prop_vars.c