glsl: Optimize (x + y cmp 0) into (x cmp -y).
authorMatt Turner <mattst88@gmail.com>
Sat, 29 Mar 2014 19:31:24 +0000 (12:31 -0700)
committerMatt Turner <mattst88@gmail.com>
Sat, 5 Apr 2014 16:47:37 +0000 (09:47 -0700)
commit34ec1a24d61f8b2f6ed58efa9fe7ea8cec917612
tree0d157306f5281dd7892232d2543886bdc5a4f2de
parent6499ecafa5ffd8c3c62ac449a78ecefdbdd7dbbd
glsl: Optimize (x + y cmp 0) into (x cmp -y).

Cuts a small handful of instructions in Serious Sam 3:

instructions in affected programs:     4692 -> 4666 (-0.55%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/opt_algebraic.cpp