projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fd4280
)
nir: Add opt_algebraic rules for xor with zero.
author
Matt Turner
<mattst88@gmail.com>
Tue, 2 Feb 2016 00:34:46 +0000
(16:34 -0800)
committer
Matt Turner
<mattst88@gmail.com>
Tue, 9 Feb 2016 04:38:17 +0000
(20:38 -0800)
instructions in affected programs: 668 -> 664 (-0.60%)
helped: 4
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/compiler/nir/nir_opt_algebraic.py
patch
|
blob
|
history
diff --git
a/src/compiler/nir/nir_opt_algebraic.py
b/src/compiler/nir/nir_opt_algebraic.py
index e7765faa14661840b79cfbbbba60a6348b23a586..60df69fadbd0efb20dd84c72088c9b3baa32fb28 100644
(file)
--- 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))),