From d4c7c3c225b7c34669498c15c2d3186cf6a4647e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 4 May 2018 13:33:47 -0700 Subject: nir: Add lowering for ifind_msb to ufind_msb. ufind_msb is easily expressed in terms of clz, and we can reduce ifind_msb to that. Reviewed-by: Matt Turner Reviewed-by: Ian Romanick --- src/compiler/nir/nir.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compiler/nir/nir.h') diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 519c0198879..9fca61f0070 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1913,6 +1913,8 @@ typedef struct nir_shader_compiler_options { bool lower_bitfield_insert_to_shifts; /** Lowers bfm to shifts and subtracts. */ bool lower_bfm; + /** Lowers ifind_msb to compare and ufind_msb */ + bool lower_ifind_msb; bool lower_uadd_carry; bool lower_usub_borrow; /** lowers fneg and ineg to fsub and isub. */ -- cgit v1.2.3