nir: Add lowering for ifind_msb to ufind_msb.
authorEric Anholt <eric@anholt.net>
Fri, 4 May 2018 20:33:47 +0000 (13:33 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 6 Jun 2018 20:44:28 +0000 (13:44 -0700)
commitd4c7c3c225b7c34669498c15c2d3186cf6a4647e
tree4e8b71ad3e41a486ec8533c95260022df422aca4
parentaf88acf4c4e2e14161872752fb9fb4683f9c8845
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 <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/nir/nir.h
src/compiler/nir/nir_opt_algebraic.py