nir: Add algebraic optimizations for division and reciprocal.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 22 Jan 2015 07:52:17 +0000 (23:52 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 23 Jan 2015 22:53:26 +0000 (14:53 -0800)
commit15063d2ad0945004ef387511d0c805bbe734bc5f
tree08315aebf71d395a3bc5561a28f245ddd5854ed6
parentbbd60f6d7916d5758ba1b8d49cb0c37c1543199e
nir: Add algebraic optimizations for division and reciprocal.

These also exist in opt_algebraic.cpp.

total NIR instructions in shared programs: 2011430 -> 2011211 (-0.01%)
NIR instructions in affected programs:     42221 -> 42002 (-0.52%)
helped:                                    198

total i965 instructions in shared programs: 6020553 -> 6020116 (-0.01%)
i965 instructions in affected programs:     84322 -> 83885 (-0.52%)
helped:                                     394
HURT:                                       1 (by 1 instruction)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/nir/nir_opt_algebraic.py