nir/search: Introduce a src_is_type() helper for 'a@type' handling.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 17 Aug 2016 22:02:58 +0000 (15:02 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 18 Aug 2016 08:26:47 +0000 (01:26 -0700)
commit241870fe5b91c6efaa77a68dc9ed4a335dc76650
tree4bead287532f22c0f4f20f5bcda492b66d1ae4e4
parentd14dd727f4aded5bd34a78dc2c81374a78114440
nir/search: Introduce a src_is_type() helper for 'a@type' handling.

Currently, 'a@type' can only match if 'a' is produced by an ALU
instruction.  This is rather limited - there are other cases we
can easily detect which we should handle.

Extending the code in-place would be fairly messy, so we introduce
a new src_is_type() helper.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_search.c