[Mesa-stable] [PATCH] nir/search: Use the correct bit size for integer comparisons
Eric Anholt
eric at anholt.net
Sat Jan 21 16:07:39 UTC 2017
Jason Ekstrand <jason at jlekstrand.net> writes:
> The previous code always compared integers as 64-bit. Due to variations
> in sign-extension in the code generated by nir_opt_algebraic.py, this
> meant that nir_search doesn't always do what you want. Instead, 32-bit
> values should be matched as 32-bit and 64-bit values should be matched
> as 64-bit. While we're here we unify the unsigned and signed paths.
> Now that we're using the right bit size, they should be the same since
> the only difference we had before was sign extension.
>
> This gets the UE4 bitfield_extract optimization working again. It had
> stopped working due to the constant 0xff00ff00 getting sign-extended
> when it shouldn't have.
>
> Cc: "17.0 13.0" <mesa-stable at lists.freedesktop.org>
> Cc: Eric Anholt <eric at anholt.net>
I like this version better.
Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20170122/6af65b84/attachment.sig>
More information about the mesa-stable
mailing list