nir/copy_prop_vars: change test helper to get intrinsics
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 14 Jan 2019 21:33:00 +0000 (13:33 -0800)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Sat, 23 Feb 2019 05:00:50 +0000 (21:00 -0800)
commitc4beadd28e88a1c0206c39be82375e8d1b05d06e
tree64d8fe4561dc47de7a1436a666bd73952028a07e
parentfdcb9779d921878fc8908930a1e589afdfc5c5f4
nir/copy_prop_vars: change test helper to get intrinsics

Replace find_next_intrinsic(intrinsic, after) with
get_intrinsic(intrinsic, index).  This makes slightly more convenient
to check the resulting loads/stores/copies, since in most tests we
know which one we care about.  The cost is to perform more traversals,
but for such tests this is not a problem.

Added the ASSERT_EQ() on count to some tests missing it, so the
indices queried are always expected to find something.

Also, drop two nir_print_shader leftover calls in a test.

v2: Remove redundant assertions.  nir_src_comp_as_uint already
    assert what we need.  (Jason)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/tests/vars_tests.cpp