nir/lower_int64: fix find_lsb(0)
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 26 Sep 2023 18:29:37 +0000 (19:29 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 27 Sep 2023 22:13:01 +0000 (22:13 +0000)
commitbcdac65ca3718b237abddc9f4714d4580c081e35
treebd1d83958d698b954d9b284531664d31546c1b5a
parente90f9d8e212535fbd44bb4088fb0e8078d9f2935
nir/lower_int64: fix find_lsb(0)

If the high 32 bits were zero, this would be umin(find_lsb(lo), 31). This
evaluates to 31 if lo is also zero, instead of -1.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Fixes: 9293d8e64bc7 ("nir: Add find_lsb lowering to nir_lower_int64.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25409>
src/compiler/nir/nir_lower_int64.c