nir: Recognize open-coded fmin/fmax.
authorMatt Turner <mattst88@gmail.com>
Wed, 11 Feb 2015 05:43:32 +0000 (21:43 -0800)
committerMatt Turner <mattst88@gmail.com>
Wed, 11 Feb 2015 21:50:19 +0000 (13:50 -0800)
commit4c42e1116b552cca1ed667c20ae9ba966b580983
treeb117f90e3f0d305cc1595a3ef3c4f4f2d651c557
parent56e21647e20db8e3708001a8600c3d8e7d12d841
nir: Recognize open-coded fmin/fmax.

And unfortunately other shaders do the same thing but with >=/<= which
we can't apply this optimization to because of NaNs.

instructions in affected programs:     23309 -> 22938 (-1.59%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/nir/nir_opt_algebraic.py