projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4188a9
)
nir: add a couple of ior opts to nir_opt_algebraic
author
Timothy Arceri
<tarceri@itsqueeze.com>
Mon, 16 Jul 2018 05:19:29 +0000
(15:19 +1000)
committer
Timothy Arceri
<tarceri@itsqueeze.com>
Tue, 17 Jul 2018 23:53:27 +0000
(09:53 +1000)
One of these was seen in a Deus Ex shader.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
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 5e07d662b0717ebf07aff0a0b2ca5d4462d512f1..f49b43f3213ea89faac38dcfae6515bd3fef9f73 100644
(file)
--- a/
src/compiler/nir/nir_opt_algebraic.py
+++ b/
src/compiler/nir/nir_opt_algebraic.py
@@
-285,6
+285,9
@@
optimizations = [
(('iand', ('uge(is_used_once)', a, b), ('uge', a, c)), ('uge', a, ('umax', b, c))),
(('iand', ('uge(is_used_once)', a, c), ('uge', b, c)), ('uge', ('umin', a, b), c)),
+ (('ior', 'a@bool', ('ieq', a, False)), True),
+ (('ior', 'a@bool', ('inot', a)), True),
+
(('iand', ('ieq', 'a@32', 0), ('ieq', 'b@32', 0)), ('ieq', ('ior', 'a@32', 'b@32'), 0)),
# These patterns can result when (a < b || a < c) => (a < min(b, c))