mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 23:40:10 +01:00
nir/algebraic: add optimization pattern for ('ult', a, ('and', b, a)) and friends.
These optimizations are based on the fact that 'and(a,b) <= umin(a,b)'. For AMD, this series moves the optimization from LLVM to NIR, so currently no vkpipeline-db changes here. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
fa6ea16a8d
commit
a74f256c58
1 changed files with 4 additions and 0 deletions
|
|
@ -497,6 +497,10 @@ optimizations = [
|
|||
(('ult', ('umax', a, b), a), False),
|
||||
(('uge', a, ('umax', b, a)), ('uge', a, b)),
|
||||
(('uge', ('umin', a, b), a), ('uge', b, a)),
|
||||
(('ult', a, ('iand', b, a)), False),
|
||||
(('ult', ('ior', a, b), a), False),
|
||||
(('uge', a, ('iand', b, a)), True),
|
||||
(('uge', ('ior', a, b), a), True),
|
||||
|
||||
(('ilt', '#a', ('imax', '#b', c)), ('ior', ('ilt', a, b), ('ilt', a, c))),
|
||||
(('ilt', ('imin', '#a', b), '#c'), ('ior', ('ilt', a, c), ('ilt', b, c))),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue