Sanjay Patel 3d497cd778 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

llvm-svn: 219445
2014-10-09 21:26:35 +00:00
..
2014-04-12 01:26:00 +00:00
2013-03-27 06:52:27 +00:00
2014-09-12 14:26:36 +00:00
2013-07-03 17:59:07 +00:00
2010-03-28 07:58:37 +00:00
2013-08-19 05:01:02 +00:00
2013-04-05 23:29:01 +00:00
2012-12-20 17:47:27 +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
2013-04-01 15:58:15 +00:00
2014-07-18 23:29:49 +00:00
2012-08-28 02:10:15 +00:00
2011-05-02 15:58:16 +00:00
2012-08-28 02:10:33 +00:00
2010-11-14 22:22:14 +00:00
2014-07-18 23:29:49 +00:00
2013-04-27 00:43:16 +00:00
2014-07-25 17:47:22 +00:00
2013-12-20 18:08:54 +00:00
2010-11-14 22:22:14 +00:00
2012-12-19 15:49:14 +00:00