nir/find_array_copies: Reject copies with mismatched type
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 31 Jul 2019 09:32:30 +0000 (11:32 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Fri, 2 Aug 2019 08:34:29 +0000 (10:34 +0200)
commitf41516bdb5720082702d8cb02f134d4da3f3a78c
tree6aac178110ea91466fb944455e7832ea84d41707
parent7368000868c21e72778d66b0cfd7661abfacfd00
nir/find_array_copies: Reject copies with mismatched type

When we detect a scalar/vector copy through load_deref/store_deref, we
have to be careful since those can bitcast an int to a float and
vice-versa even though copy_deref can't.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111251
Fixes: 156306e5e62 ("nir/find_array_copies: Handle wildcards and overlapping copies")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/compiler/nir/nir_opt_find_array_copies.c