From e8b368ad1c4bdafc32505b722617b8ab19296fbe Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 30 May 2018 20:32:24 +1000 Subject: [PATCH] nir: add unsigned comparison simplifications This avoids loop unrolling regressions in Wolfenstein II on DXVK with an upcoming optimisation series from Samuel. Reviewed-by: Bas Nieuwenhuizen --- src/compiler/nir/nir_opt_algebraic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 909ea3daf42..21b9acecbe2 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -149,7 +149,9 @@ 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)), + (('inot', ('uge', a, b)), ('ult', a, b)), (('inot', ('ieq', a, b)), ('ine', a, b)), (('inot', ('ine', a, b)), ('ieq', a, b)), -- 2.30.2