[Mesa-dev] [PATCH] nir: add unsigned less then comparison simplification

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Wed May 30 11:19:01 UTC 2018


On Wed, May 30, 2018 at 1:09 PM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> This avoids loop unrolling regressions in Wolfenstein II on DXVK
> with an upcoming optimisation series from Samuel.
> ---
>  src/compiler/nir/nir_opt_algebraic.py | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
> index 909ea3daf42..14ffd9e7b82 100644
> --- a/src/compiler/nir/nir_opt_algebraic.py
> +++ b/src/compiler/nir/nir_opt_algebraic.py
> @@ -149,6 +149,7 @@ optimizations = [
>     (('~inot', ('feq', a, b)), ('fne', a, b)),
>     (('~inot', ('fne', a, b)), ('feq', a, b)),
>     (('inot', ('ilt', a, b)), ('ige', a, b)),
> +   (('inot', ('ult', a, b)), ('uge', a, b)),
>     (('inot', ('ige', a, b)), ('ilt', a, b)),

Also add the unsigned version of this?
   (('inot', ('uge', a, b)), ('ult', a, b)),

Otherwise,

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

>     (('inot', ('ieq', a, b)), ('ine', a, b)),
>     (('inot', ('ine', a, b)), ('ieq', a, b)),
> --
> 2.17.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list