mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
nir: Optimize a + neg(a)
Shader-db i965 instructions: total instructions in shared programs: 1711180 -> 1711159 (-0.00%) instructions in affected programs: 825 -> 804 (-2.55%) helped: 9 HURT: 0 GAINED: 3 LOST: 3 Shader-db NIR instructions: total instructions in shared programs: 606187 -> 606179 (-0.00%) instructions in affected programs: 298 -> 290 (-2.68%) helped: 4 HURT: 0 GAINED: 0 LOST: 0 Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
This commit is contained in:
parent
0525f2e851
commit
8fb8fe46fa
1 changed files with 2 additions and 0 deletions
|
|
@ -58,6 +58,8 @@ optimizations = [
|
|||
(('iadd', a, 0), a),
|
||||
(('fadd', ('fmul', a, b), ('fmul', a, c)), ('fmul', a, ('fadd', b, c))),
|
||||
(('iadd', ('imul', a, b), ('imul', a, c)), ('imul', a, ('iadd', b, c))),
|
||||
(('fadd', ('fneg', a), a), 0.0),
|
||||
(('iadd', ('ineg', a), a), 0),
|
||||
(('fmul', a, 0.0), 0.0),
|
||||
(('imul', a, 0), 0),
|
||||
(('fmul', a, 1.0), a),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue