glsl: Optimize scalar all_equal/any_nequal into equal/nequal.
authorMatt Turner <mattst88@gmail.com>
Fri, 22 Aug 2014 21:30:38 +0000 (14:30 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 5 Dec 2014 17:49:42 +0000 (09:49 -0800)
commitbe80f69ecdb5544509d762ce5c832c4ad3abbe9b
tree799515aadcc3ef21ed4f93a579b1873a7ab972c8
parenta1fc6a91e5c6ab098fa8576e63b3a070852aa2a7
glsl: Optimize scalar all_equal/any_nequal into equal/nequal.

Cuts an instruction from two shaders in Tesseract, by allowing the
(x+y) cmp 0 -> x cmp -y optimization to take place.

instructions in affected programs:     1198 -> 1194 (-0.33%)

Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/opt_algebraic.cpp