mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 18:40:13 +01:00
nir: Collapse repeated bcsels on the same argument.
vc4 results: total instructions in shared programs: 39881 -> 39794 (-0.22%) instructions in affected programs: 6302 -> 6215 (-1.38%) Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
parent
a38038ca5e
commit
345c2b288a
1 changed files with 1 additions and 0 deletions
|
|
@ -86,6 +86,7 @@ optimizations = [
|
|||
(('bcsel', ('flt', a, b), a, b), ('fmin', a, b)),
|
||||
(('bcsel', ('flt', a, b), b, a), ('fmax', a, b)),
|
||||
(('bcsel', ('inot', 'a@bool'), b, c), ('bcsel', a, c, b)),
|
||||
(('bcsel', a, ('bcsel', a, b, c), d), ('bcsel', a, b, d)),
|
||||
(('fmin', ('fmax', a, 0.0), 1.0), ('fsat', a), '!options->lower_fsat'),
|
||||
(('fsat', a), ('fmin', ('fmax', a, 0.0), 1.0), 'options->lower_fsat'),
|
||||
(('fsat', ('fsat', a)), ('fsat', a)),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue