nir: fix nir_copy_propagation test
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Tue, 23 Oct 2018 13:55:11 +0000 (15:55 +0200)
committerJuan A. Suarez Romero <jasuarez@igalia.com>
Wed, 24 Oct 2018 07:13:24 +0000 (09:13 +0200)
commit3112da346bd006876d9ac23a781b0a3d0a366653
treec78955febac29b163738c50e8174b688fd02f4b6
parent0ff1ccca25232bdaddc6c8b56fba718768be1f95
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 <jasuarez@igalia.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108532
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/tests/vars_tests.cpp