diff options
author | Jason Ekstrand <[email protected]> | 2018-10-20 09:10:02 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-10-22 14:24:15 -0500 |
commit | 16870de8a0aab97bd3534b660e7ea73e90ac11cd (patch) | |
tree | 6a2b213cc8f477bdb923b9aceb430715724cb7a1 /src/compiler/nir/nir_opt_intrinsics.c | |
parent | ce36f412c99340814c429f99694423af61825c64 (diff) |
nir: Use nir_src_is_const and nir_src_as_* in core code
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_intrinsics.c')
-rw-r--r-- | src/compiler/nir/nir_opt_intrinsics.c | 4 |
1 files changed, 2 insertions, 2 deletions
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: |