summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2018-07-06 10:07:32 -0700
committerIan Romanick <ian.d.romanick@intel.com>2018-07-09 13:44:57 -0700
commit76b08a4d605c2469c4942118fb1fe66e9bfd9c8b (patch)
treec5701f33c5099a4e755544f9094a5b1f71598d9c
parentd41c83bfc472980331864ba4045e4a952c406603 (diff)
Boolean simplifications, part 2logic-expression-frobbing
-rw-r--r--src/compiler/nir/nir_opt_algebraic.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index 37b0016f634..09090de9644 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -440,7 +440,9 @@ optimizations = [
(('~frcp', ('frsq', a)), ('fsqrt', a), '!options->lower_fsqrt'),
# Boolean simplifications
(('ieq', 'a@bool', True), a),
+ (('ieq', 'a@bool', False), ('inot', a)),
(('ine(is_not_used_by_if)', 'a@bool', True), ('inot', a)),
+ (('ine', 'a@bool', True), ('inot', a)),
(('ine', 'a@bool', False), a),
(('ieq(is_not_used_by_if)', 'a@bool', False), ('inot', 'a')),
(('bcsel', a, True, False), a),