mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 21:30:09 +01:00
nir: Add addition/multiplication identities of exp/log.
instructions in affected programs: 2858 -> 2808 (-1.75%) helped: 12 Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
099c729b4c
commit
a2b6e908cf
1 changed files with 6 additions and 0 deletions
|
|
@ -153,6 +153,12 @@ optimizations = [
|
|||
(('flog', ('frsq', a)), ('fmul', -0.5, ('flog', a))),
|
||||
(('flog2', ('fpow', a, b)), ('fmul', b, ('flog2', a))),
|
||||
(('flog', ('fpow', a, b)), ('fmul', b, ('flog', a))),
|
||||
(('fadd', ('flog2', a), ('flog2', b)), ('flog2', ('fmul', a, b))),
|
||||
(('fadd', ('flog', a), ('flog', b)), ('flog', ('fmul', a, b))),
|
||||
(('fadd', ('flog2', a), ('fneg', ('flog2', b))), ('flog2', ('fdiv', a, b))),
|
||||
(('fadd', ('flog', a), ('fneg', ('flog', b))), ('flog', ('fdiv', a, b))),
|
||||
(('fmul', ('fexp2', a), ('fexp2', b)), ('fexp2', ('fadd', a, b))),
|
||||
(('fmul', ('fexp', a), ('fexp', b)), ('fexp', ('fadd', a, b))),
|
||||
# Division and reciprocal
|
||||
(('fdiv', 1.0, a), ('frcp', a)),
|
||||
(('frcp', ('frcp', a)), a),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue