nir/algebraic: add optimization pattern for ('ult', a, ('and', b, a)) and friends.
authorDaniel Schürmann <daniel.schuermann@campus.tu-berlin.de>
Fri, 25 Jan 2019 11:48:44 +0000 (12:48 +0100)
committerDaniel Schürmann <daniel@schuermann.dev>
Mon, 24 Jun 2019 16:42:20 +0000 (18:42 +0200)
commita74f256c58a2c1fca3ce75e5199a04a22768450e
tree872b355b982704f23b2d1024a6489aae87da97d0
parentfa6ea16a8daf82886b7fc67c18f9ea87d2388cfd
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>
src/compiler/nir/nir_opt_algebraic.py