[Mesa-dev] [PATCH 2/6] nir/algebraic: Generalize an optimization
Jason Ekstrand
jason at jlekstrand.net
Sat Oct 20 18:01:30 UTC 2018
There's nothing boolean about (a | ~a) ~> -1
---
src/compiler/nir/nir_opt_algebraic.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index cc747250ba5..8b24daddfdc 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -373,7 +373,7 @@ optimizations = [
(('iand', ('uge(is_used_once)', a, c), ('uge', b, c)), ('uge', ('umin', a, b), c)),
(('ior', 'a at bool', ('ieq', a, False)), True),
- (('ior', 'a at bool', ('inot', a)), True),
+ (('ior', a, ('inot', a)), -1),
(('iand', ('ieq', 'a at 32', 0), ('ieq', 'b at 32', 0)), ('ieq', ('ior', 'a at 32', 'b at 32'), 0)),
--
2.19.1
More information about the mesa-dev
mailing list