nir/search: don't consider INT_MIN a negative power-of-two
authorRhys Perry <pendingchaos02@gmail.com>
Wed, 21 Jul 2021 16:13:40 +0000 (17:13 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 9 Aug 2021 11:00:39 +0000 (11:00 +0000)
commit2bb49e45873d29331e12221ee51ce2644ff83863
treeaa53b062016491cd7358824c12b0df65cb8a69b8
parentb009467b810ce42a97f80c15cbb5647781a5f807
nir/search: don't consider INT_MIN a negative power-of-two

ineg(INT_MIN)/iabs(INT_MIN) won't work as expected.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12039>
src/compiler/nir/nir_search_helpers.h