summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <[email protected]>2018-10-23 15:55:11 +0200
committerJuan A. Suarez Romero <[email protected]>2018-10-24 09:13:24 +0200
commit3112da346bd006876d9ac23a781b0a3d0a366653 (patch)
treec78955febac29b163738c50e8174b688fd02f4b6 /src
parent0ff1ccca25232bdaddc6c8b56fba718768be1f95 (diff)
nir: fix nir_copy_propagation test
Use nir_src_comp_as_uint() to read the proper second component, as nir_src_as_uint() returns the first one. v2: Use nir_src_comp_as_uint() [Jason] Fixes: 16870de8a0a ("nir: Use nir_src_is_const and nir_src_as_* in core code") Signed-off-by: Juan A. Suarez Romero <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108532 Tested-by: Michel Dänzer <[email protected]> Tested-by: Vinson Lee <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-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 02c53804b84..a7bbeb02277 100644
--- a/src/compiler/nir/tests/vars_tests.cpp
+++ b/src/compiler/nir/tests/vars_tests.cpp
@@ -375,7 +375,7 @@ TEST_F(nir_copy_prop_vars_test, store_store_load_different_components)
ASSERT_TRUE(store_to_v1->src[1].is_ssa);
ASSERT_TRUE(nir_src_is_const(store_to_v1->src[1]));
- ASSERT_EQ(nir_src_as_uint(store_to_v1->src[1]), 20);
+ ASSERT_EQ(nir_src_comp_as_uint(store_to_v1->src[1], 1), 20);
break;
}
}
@@ -424,7 +424,7 @@ TEST_F(nir_copy_prop_vars_test, store_store_load_different_components_in_many_bl
ASSERT_TRUE(store_to_v1->src[1].is_ssa);
ASSERT_TRUE(nir_src_is_const(store_to_v1->src[1]));
- ASSERT_EQ(nir_src_as_uint(store_to_v1->src[1]), 20);
+ ASSERT_EQ(nir_src_comp_as_uint(store_to_v1->src[1], 1), 20);
break;
}
}