summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/tests
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-02-25 20:37:59 -0800
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-02-28 23:55:31 -0800
commit1458aa1f78edc22ded5b40f17c148a22fcabfda2 (patch)
tree2341bc981ecc6d16bcd931ac8c779b648bcbfbf7 /src/compiler/nir/tests
parent6c0de78cc257240b5e55e033b4df8d7d87dcdfa7 (diff)
nir/copy_prop_vars: handle indirect vector elements
Differently than the direct case, the indirect array derefs of vector are handled like regular derefs, with the exception that we ignore any vector entry that has SSA values when performing a load. Such SSA values don't help loading of the indirect unless we emit an if-ladder. Copy_derefs are supported for indirects. Also enable two tests that now pass. v2: Remove unnecessary temporaries. Be clearer when identifying the case where copy_entry doesn't help when we are dealing with an indirect array_deref (of a vector). (Jason) Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/tests')
-rw-r--r--src/compiler/nir/tests/vars_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/tests/vars_tests.cpp b/src/compiler/nir/tests/vars_tests.cpp
index 492624a2d0e..893ce297a43 100644
--- a/src/compiler/nir/tests/vars_tests.cpp
+++ b/src/compiler/nir/tests/vars_tests.cpp
@@ -603,7 +603,7 @@ TEST_F(nir_copy_prop_vars_test, store_load_direct_array_deref_on_vector)
EXPECT_TRUE(nir_src_as_alu_instr(&fourth_store->src[1]));
}
-TEST_F(nir_copy_prop_vars_test, DISABLED_store_load_indirect_array_deref_on_vector)
+TEST_F(nir_copy_prop_vars_test, store_load_indirect_array_deref_on_vector)
{
nir_variable *vec = create_ivec2(nir_var_mem_ssbo, "vec");
nir_variable *idx = create_int(nir_var_mem_ssbo, "idx");
@@ -640,7 +640,7 @@ TEST_F(nir_copy_prop_vars_test, DISABLED_store_load_indirect_array_deref_on_vect
EXPECT_EQ(first->src[1].ssa, second->src[1].ssa);
}
-TEST_F(nir_copy_prop_vars_test, DISABLED_store_load_direct_and_indirect_array_deref_on_vector)
+TEST_F(nir_copy_prop_vars_test, store_load_direct_and_indirect_array_deref_on_vector)
{
nir_variable *vec = create_ivec2(nir_var_mem_ssbo, "vec");
nir_variable *idx = create_int(nir_var_mem_ssbo, "idx");