nir/search_helpers: Use nir_src_is_const and friends
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 20 Oct 2018 17:07:41 +0000 (12:07 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 22 Oct 2018 19:24:15 +0000 (14:24 -0500)
commitce36f412c99340814c429f99694423af61825c64
treecfefc6770fd801a15214bac732a61b9eef620710
parent7bae7828aabc93bc575d637794ee4b236af62bc8
nir/search_helpers: Use nir_src_is_const and friends

This not only makes them safe for more bit sizes but it also fixes a bug
in is_zero_to_one where it would return true for constant NaN.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/nir/nir_search_helpers.h