summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/compiler/nir/nir_opt_algebraic.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index abefbb54756..4c1d547d3a1 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -218,6 +218,12 @@ optimizations = [
(('inot', ('ieq', a, b)), ('ine', a, b)),
(('inot', ('ine', a, b)), ('ieq', a, b)),
+ (('iand', ('feq', a, b), ('fne', a, b)), False),
+ (('iand', ('flt', a, b), ('flt', b, a)), False),
+ (('iand', ('ieq', a, b), ('ine', a, b)), False),
+ (('iand', ('ilt', a, b), ('ilt', b, a)), False),
+ (('iand', ('ult', a, b), ('ult', b, a)), False),
+
# This helps some shaders because, after some optimizations, they end up
# with patterns like (-a < -b) || (b < a). In an ideal world, this sort of
# matching would be handled by CSE.