mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
nir: add is_used_once for fmul(fexp2(a), fexp2(b)) to fexp2(fadd(a, b))
Otherwise the code size increases because the original fexp2() instructions can't be deleted. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
a01e9996b5
commit
b18997876f
1 changed files with 1 additions and 1 deletions
|
|
@ -334,7 +334,7 @@ optimizations = [
|
|||
(('~flog2', ('frcp', a)), ('fneg', ('flog2', a))),
|
||||
(('~flog2', ('frsq', a)), ('fmul', -0.5, ('flog2', a))),
|
||||
(('~flog2', ('fpow', a, b)), ('fmul', b, ('flog2', a))),
|
||||
(('~fmul', ('fexp2', a), ('fexp2', b)), ('fexp2', ('fadd', a, b))),
|
||||
(('~fmul', ('fexp2(is_used_once)', a), ('fexp2(is_used_once)', b)), ('fexp2', ('fadd', a, b))),
|
||||
# Division and reciprocal
|
||||
(('~fdiv', 1.0, a), ('frcp', a)),
|
||||
(('fdiv', a, b), ('fmul', a, ('frcp', b)), 'options->lower_fdiv'),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue