i965: Use LZD to implement nir_op_ufind_msb
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 21 Jun 2016 22:14:03 +0000 (15:14 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 19 Jul 2016 19:19:29 +0000 (12:19 -0700)
commitde20086eed47e6bfe7c25835d72383114f99c7a9
treee39a73795c12c7694c544954f0dedd3002d9b532
parent26c7f04d4a55b694623a389a564c9516d91c0026
i965: Use LZD to implement nir_op_ufind_msb

This uses one less instruction.

v2: Move emit_find_msb_using_lzd out of the visitor classes.  Suggested
by Curro.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp
src/mesa/drivers/dri/i965/brw_fs_nir.cpp
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp