From 16870de8a0aab97bd3534b660e7ea73e90ac11cd Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sat, 20 Oct 2018 09:10:02 -0500 Subject: nir: Use nir_src_is_const and nir_src_as_* in core code Reviewed-by: Bas Nieuwenhuizen --- src/compiler/nir/nir_opt_intrinsics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler/nir/nir_opt_intrinsics.c') diff --git a/src/compiler/nir/nir_opt_intrinsics.c b/src/compiler/nir/nir_opt_intrinsics.c index 37f08c77ef1..0bc2f0b3c82 100644 --- a/src/compiler/nir/nir_opt_intrinsics.c +++ b/src/compiler/nir/nir_opt_intrinsics.c @@ -47,12 +47,12 @@ opt_intrinsics_impl(nir_function_impl *impl) switch (intrin->intrinsic) { case nir_intrinsic_vote_any: case nir_intrinsic_vote_all: - if (nir_src_as_const_value(intrin->src[0])) + if (nir_src_is_const(intrin->src[0])) replacement = nir_ssa_for_src(&b, intrin->src[0], 1); break; case nir_intrinsic_vote_feq: case nir_intrinsic_vote_ieq: - if (nir_src_as_const_value(intrin->src[0])) + if (nir_src_is_const(intrin->src[0])) replacement = nir_imm_int(&b, NIR_TRUE); break; default: -- cgit v1.2.3