Sanjay Patel a4554c2897 Improve sqrt estimate algorithm (fast-math)
This patch changes the fast-math implementation for calculating sqrt(x) from:
y = 1 / (1 / sqrt(x))
to:
y = x * (1 / sqrt(x))

This has 2 benefits: less code / faster code and one less estimate instruction 
that may lose precision.

The only target that will be affected (until http://reviews.llvm.org/D5658 is approved)
is PPC. The difference in codegen for PPC is 2 less flops for a single-precision sqrtf
or vector sqrtf and 4 less flops for a double-precision sqrt. 
We also eliminate a constant load and extra register usage.

Differential Revision: http://reviews.llvm.org/D5682



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219445 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-09 21:26:35 +00:00
..
2014-04-12 01:26:00 +00:00
2014-09-12 14:26:36 +00:00
2013-07-03 17:59:07 +00:00
2013-08-19 05:01:02 +00:00
2014-08-04 21:06:00 +00:00
2014-08-04 21:06:00 +00:00
2013-08-06 17:03:03 +00:00
2014-07-18 23:29:49 +00:00
2014-07-18 23:29:49 +00:00
2014-07-25 17:47:22 +00:00
2013-12-20 18:08:54 +00:00