i965/fs: Optimize sqrt+inv into rsq.
authorMatt Turner <mattst88@gmail.com>
Sat, 27 Sep 2014 17:34:56 +0000 (10:34 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 1 Oct 2014 00:09:34 +0000 (17:09 -0700)
commit94b68109fbe1cb60cc23a4c5a319039ada81ea81
tree9bfc35ffd2b2bca4f480a6d81b8aba59c662f42a
parentb52126b44f40643aa2c0986c1d51330f4e4130b5
i965/fs: Optimize sqrt+inv into rsq.

Transform

   sqrt a, b
   rcp  c, a

into

   sqrt a, b
   rsq  c, b

The improvement here is that we've broken a dependency between these
instructions. Leads to 330 fewer INV instructions and 330 more RSQ.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp