nir/algebraic: Add some max/min optimizations
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 15 Aug 2018 09:29:42 +0000 (04:29 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 29 Aug 2018 19:04:02 +0000 (14:04 -0500)
commitd448fa3ae35c3aa4e7bf25f8b1870315573e32fa
treeafd37266651a8f90857195f2500c0296e6faa413
parent4dd5263663585b55119e49c8dfade015c86aff1a
nir/algebraic: Add some max/min optimizations

Found by inspection.  This doesn't help much now but we'll see this
pattern with images if you load UNORM and then store UNORM.

Shader-db results on Kaby Lake:

    total instructions in shared programs: 15166916 -> 15166910 (<.01%)
    instructions in affected programs: 761 -> 755 (-0.79%)
    helped: 6
    HURT: 0

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/nir/nir_opt_algebraic.py