nir: fix ifind_msb_rev by using appropriate type

As you can see comparion "x < 0" doesn't make
sense if x is unsigned.

Fixes: a5747f8a ("nir: add opcodes for *find_msb_rev and lowering ")

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12548>
This commit is contained in:
Filip Gawin 2021-08-25 23:19:36 +02:00 committed by Marge Bot
parent 9083e9a483
commit 46f3582c6f

View file

@ -487,7 +487,7 @@ for (int bit = 31; bit >= 0; bit--) {
}
""")
unop_convert("ifind_msb_rev", tint32, tuint, """
unop_convert("ifind_msb_rev", tint32, tint, """
dst = -1;
if (src0 != 0 && src0 != -1) {
for (int bit = 0; bit < 31; bit++) {