diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 890899a962e..728581db862 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -693,6 +693,8 @@ optimizations.extend([ (('ieq', ('ineg', 'a(is_not_const)'), '#b'), ('ieq', a, ('ineg', b))), (('ine', ('ineg', 'a(is_not_const)'), '#b'), ('ine', a, ('ineg', b))), + (('ieq', ('inot', 'a(is_not_const)'), '#b'), ('ieq', a, ('inot', b))), + (('ine', ('inot', 'a(is_not_const)'), '#b'), ('ine', a, ('inot', b))), (('ieq', ('iabs', a), 0), ('ieq', a, 0)), (('ine', ('iabs', a), 0), ('ine', a, 0)), @@ -701,6 +703,8 @@ optimizations.extend([ (('ieq', ('ineg', a), ('ineg', b)), ('ieq', a, b)), (('ine', ('ineg', a), ('ineg', b)), ('ine', a, b)), + (('ieq', ('inot', a), ('inot', b)), ('ieq', a, b)), + (('ine', ('inot', a), ('inot', b)), ('ine', a, b)), (('fneu', ('fabs', a), 0.0), ('fneu', a, 0.0)), (('feq', ('fabs', a), 0.0), ('feq', a, 0.0)),