glsl: Recognize open-coded pow(x, y).
authorMatt Turner <mattst88@gmail.com>
Sun, 7 Sep 2014 07:41:41 +0000 (00:41 -0700)
committerMatt Turner <mattst88@gmail.com>
Sat, 27 Sep 2014 19:18:37 +0000 (12:18 -0700)
commit5ccdc23a86978628449ace0058cd3697020b0c94
tree9ed677bba3e223e8ff6d7680bb6e5f10c05dae27
parente9aee2572a56b24d69dd1e01c1a1db3608dd2bc9
glsl: Recognize open-coded pow(x, y).

pow(x, y) is equivalent to exp(log(x) * y).

instructions in affected programs:     578 -> 458 (-20.76%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/opt_algebraic.cpp