glsl: Optimize pow(x, 2) into x * x.
authorMatt Turner <mattst88@gmail.com>
Fri, 28 Feb 2014 21:33:19 +0000 (13:33 -0800)
committerMatt Turner <mattst88@gmail.com>
Wed, 19 Mar 2014 06:20:29 +0000 (23:20 -0700)
commit6cbc64c3cb416fadad6e80042e24cd1e1b682897
tree906bd4d7ca4ad006ec3a922fff169992b4176f10
parent9a9eaaa79a43e5fb249ff56a06c3f845e6a28a41
glsl: Optimize pow(x, 2) into x * x.

Cuts two instructions out of SynMark's Gl32VSInstancing benchmark.

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