[Mesa-dev] [PATCH 1/5] nir: Add opt_algebraic rules for xor with zero.
Matt Turner
mattst88 at gmail.com
Fri Feb 5 01:47:57 UTC 2016
instructions in affected programs: 668 -> 664 (-0.60%)
helped: 4
---
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 e7765fa..60df69f 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -149,6 +149,8 @@ optimizations = [
(('ior', a, 0), a),
(('fxor', a, a), 0.0),
(('ixor', a, a), 0),
+ (('fxor', a, 0.0), a),
+ (('ixor', a, 0), a),
(('inot', ('inot', a)), a),
# DeMorgan's Laws
(('iand', ('inot', a), ('inot', b)), ('inot', ('ior', a, b))),
--
2.4.10
More information about the mesa-dev
mailing list