nir/tests: Add copy propagation tests with scoped_memory_barrier
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 18 Oct 2019 05:58:57 +0000 (22:58 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 24 Oct 2019 18:39:56 +0000 (11:39 -0700)
commit901071044ee7be6e67df97e7facabe7e72295296
treefbf9ebcabdb3aed93e8c902761ad81beccf6b214
parent73572abc2a7a15bc16d2e7e4df6aa6096fd1985b
nir/tests: Add copy propagation tests with scoped_memory_barrier

Three groups of tests, effectively defining what cases the
optimization is allowed or prevented

- Redudant loads       (a load  generated the value)
- Propagate SSA values (a store generated the value)
- Propagate a var      (a copy  generated the value)

Change the shader type of the tests to be COMPUTE so
nir_var_mem_shared can also be used.  Doesn't affect the semantic of
the copy propagation.

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