projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70d3efe
)
nir/algebraic: add distributive rules for ior/iand
author
Daniel Schürmann
<daniel@schuermann.dev>
Wed, 15 Jul 2020 17:23:54 +0000
(19:23 +0200)
committer
Marge Bot
<eric+marge@anholt.net>
Mon, 20 Jul 2020 15:56:46 +0000
(15:56 +0000)
Totals from 581 (0.43% of 134368) affected shaders (Polaris):
CodeSize:
1389560
->
1386488
(-0.22%)
Instrs: 264488 -> 263984 (-0.19%)
Cycles:
1057952
->
1055936
(-0.19%)
VMEM: 296016 -> 291613 (-1.49%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4830>
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 bd0da989c9ea9be87104b9f10b3b8941366dbb0b..213bc843a68c1f0ca424afc23d32825d39879869 100644
(file)
--- a/
src/compiler/nir/nir_opt_algebraic.py
+++ b/
src/compiler/nir/nir_opt_algebraic.py
@@
-121,6
+121,8
@@
optimizations = [
(('usadd_4x8', a, ~0), ~0),
(('~fadd', ('fmul', a, b), ('fmul', a, c)), ('fmul', a, ('fadd', b, c))),
(('iadd', ('imul', a, b), ('imul', a, c)), ('imul', a, ('iadd', b, c))),
+ (('iand', ('ior', a, b), ('ior', a, c)), ('ior', a, ('iand', b, c))),
+ (('ior', ('iand', a, b), ('iand', a, c)), ('iand', a, ('ior', b, c))),
(('~fadd', ('fneg', a), a), 0.0),
(('iadd', ('ineg', a), a), 0),
(('iadd', ('ineg', a), ('iadd', a, b)), b),