nir: Add variants of some of the comparison simplifications.
authorEric Anholt <eric@anholt.net>
Tue, 27 Jan 2015 00:48:48 +0000 (16:48 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 29 Jan 2015 19:44:06 +0000 (11:44 -0800)
commitfc884eadf1fb188b7dea1a5c2f8ce37c6258e324
treee8d6fab039d95df40105cc596e3651545235bf13
parent2b9c3bace78aaf0728e40b4b4cf7124e6a138696
nir: Add variants of some of the comparison simplifications.

We end up with these from TGSI-to-NIR because the pass generating the
comparisons doesn't know if the arg is actually a bool input or not.  vc4
results:

total instructions in shared programs: 41801 -> 41508 (-0.70%)
instructions in affected programs:     4253 -> 3960 (-6.89%)

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/nir/nir_opt_algebraic.py