Re: [AArch64] Emit square root using the Newton series

2016-04-27 Thread Evandro Menezes
On 04/27/16 09:23, James Greenhalgh wrote: On Tue, Apr 12, 2016 at 01:14:51PM -0500, Evandro Menezes wrote: On 04/05/16 17:30, Evandro Menezes wrote: On 04/05/16 13:37, Wilco Dijkstra wrote: I can't get any of these to work... Not only do I get a large number of collisions and duplicated code

Re: [AArch64] Emit square root using the Newton series

2016-04-27 Thread James Greenhalgh
On Tue, Apr 12, 2016 at 01:14:51PM -0500, Evandro Menezes wrote: > On 04/05/16 17:30, Evandro Menezes wrote: > >On 04/05/16 13:37, Wilco Dijkstra wrote: > >>I can't get any of these to work... Not only do I get a large > >>number of collisions and duplicated > >>code between these patches, when I t

RE: [AArch64] Emit square root using the Newton series

2016-04-21 Thread Evandro Menezes
> On 04/05/16 17:30, Evandro Menezes wrote: > > On 04/05/16 13:37, Wilco Dijkstra wrote: > >> I can't get any of these to work... Not only do I get a large number > >> of collisions and duplicated code between these patches, when I try > >> to resolve them, all I get is crashes whenever I try to us

Re: [AArch64] Emit square root using the Newton series

2016-04-12 Thread Evandro Menezes
On 04/05/16 17:30, Evandro Menezes wrote: On 04/05/16 13:37, Wilco Dijkstra wrote: I can't get any of these to work... Not only do I get a large number of collisions and duplicated code between these patches, when I try to resolve them, all I get is crashes whenever I try to use sqrt (even rsqr

Re: [AArch64] Emit square root using the Newton series

2016-04-05 Thread Evandro Menezes
On 04/05/16 13:37, Wilco Dijkstra wrote: I can't get any of these to work... Not only do I get a large number of collisions and duplicated code between these patches, when I try to resolve them, all I get is crashes whenever I try to use sqrt (even rsqrt stopped working). Do you have a patchset

Re: [AArch64] Emit square root using the Newton series

2016-04-04 Thread Evandro Menezes
On 04/01/16 17:45, Evandro Menezes wrote: On 03/24/16 14:11, Evandro Menezes wrote: On 03/17/16 17:46, Evandro Menezes wrote: This patch refactors the function to emit the reciprocal square root approximation to also emit the square root approximation. This version of the patch cleans up the ch

Re: [AArch64] Emit square root using the Newton series

2016-04-01 Thread Evandro Menezes
On 03/24/16 14:11, Evandro Menezes wrote: On 03/17/16 17:46, Evandro Menezes wrote: This patch refactors the function to emit the reciprocal square root approximation to also emit the square root approximation. This version of the patch cleans up the changes to the MD files and fixes some bugs

Re: [AArch64] Emit square root using the Newton series

2016-03-24 Thread Evandro Menezes
On 03/17/16 17:46, Evandro Menezes wrote: This patch refactors the function to emit the reciprocal square root approximation to also emit the square root approximation. 2016-03-23 Evandro Menezes Wilco Dijkstra gcc/ * config/aarch64/aarch64-tuning-flags.de

Re: [AArch64] Emit square root using the Newton series

2016-03-19 Thread James Greenhalgh
On Wed, Mar 16, 2016 at 02:45:37PM -0500, Evandro Menezes wrote: > On 03/08/16 16:08, Evandro Menezes wrote: > >On 02/16/16 14:56, Evandro Menezes wrote: > >>On 12/08/15 15:35, Evandro Menezes wrote: > >>>Emit square root using the Newton series > >>> > >>> 2015-12-03 Evandro Menezes > >>> > >

Re: [AArch64] Emit square root using the Newton series

2016-03-19 Thread Evandro Menezes
On 03/17/16 09:55, James Greenhalgh wrote: On Wed, Mar 16, 2016 at 02:45:37PM -0500, Evandro Menezes wrote: On 03/08/16 16:08, Evandro Menezes wrote: On 02/16/16 14:56, Evandro Menezes wrote: On 12/08/15 15:35, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Ev

Re: [AArch64] Emit square root using the Newton series

2016-03-19 Thread Evandro Menezes
On 03/08/16 16:08, Evandro Menezes wrote: On 02/16/16 14:56, Evandro Menezes wrote: On 12/08/15 15:35, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Evandro Menezes gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new

Re: [AArch64] Emit square root using the Newton series

2016-03-18 Thread Evandro Menezes
On 03/10/16 19:06, Wilco Dijkstra wrote: Evandro Menezes wrote: That's what I had in mind too, but around the approximation for x^-1/2 and using masks for vector cases thusly: fcmne v3.4s, v0.4s, #0.0 frsqrte v1.4s, v0.4s fmulv2.4s, v1.4s, v1.4s frsqrts

Re: [AArch64] Emit square root using the Newton series

2016-03-14 Thread Wilco Dijkstra
Evandro Menezes wrote: > > I got the scalar version going, but I'm stuck with the vector version. > As you can see above, I need to use the complement of the mask produced > by FCMEQ to squelch the offending vector element. However, the way in > which FCMEQ is defined in GCC, it produces an intege

Re: [AArch64] Emit square root using the Newton series

2016-03-14 Thread Evandro Menezes
On 03/10/16 19:06, Wilco Dijkstra wrote: Evandro Menezes wrote: That's what I had in mind too, but around the approximation for x^-1/2 and using masks for vector cases thusly: fcmne v3.4s, v0.4s, #0.0 frsqrte v1.4s, v0.4s fmulv2.4s, v1.4s, v1.4s frsqrts

Re: [AArch64] Emit square root using the Newton series

2016-03-10 Thread Wilco Dijkstra
Evandro Menezes wrote: > > That's what I had in mind too, but around the approximation for x^-1/2 > and using masks for vector cases thusly: > >fcmne v3.4s, v0.4s, #0.0 > frsqrte v1.4s, v0.4s > fmulv2.4s, v1.4s, v1.4s > frsqrts v2.4s, v0.4s, v2.4s > fm

Re: [AArch64] Emit square root using the Newton series

2016-03-10 Thread Evandro Menezes
On 03/10/16 13:10, Wilco Dijkstra wrote: frsqrte s1, s0 fmul s2, s1, s1 frsqrts s2, s0, s2 fcmp s0, 0.0 fmul s1, s1, s2 fmul s2, s1, s1 fmul s1, s0, s1 frsqrts s2, s0, s2 fcsels1, s0, s1, eq fmul s0, s1, s2 That's

Re: [AArch64] Emit square root using the Newton series

2016-03-10 Thread Wilco Dijkstra
On 03/10/16 10:52, Wilco Dijkstra wrote: > Hi Evandro, > >> I have however encountered precision issues with DF, namely some benchmarks >> in the SPECfp CPU2000 suite would fail to validate. > Accuracy is not an issue, the computation is extremely accurate. The issue is > that your patch doesn't

Re: [AArch64] Emit square root using the Newton series

2016-03-10 Thread Evandro Menezes
On 03/10/16 10:52, Wilco Dijkstra wrote: Hi Evandro, I have however encountered precision issues with DF, namely some benchmarks in the SPECfp CPU2000 suite would fail to validate. Accuracy is not an issue, the computation is extremely accurate. The issue is that your patch doesn't support s

Re: [AArch64] Emit square root using the Newton series

2016-03-10 Thread Wilco Dijkstra
Hi Evandro, > I have however encountered precision issues with DF, namely some benchmarks > in the SPECfp CPU2000 suite would fail to validate. Accuracy is not an issue, the computation is extremely accurate. The issue is that your patch doesn't support sqrt(0.0) - it returns NaN rather than z

Re: [AArch64] Emit square root using the Newton series

2016-03-08 Thread Evandro Menezes
On 03/08/16 16:08, Evandro Menezes wrote: On 02/16/16 14:56, Evandro Menezes wrote: On 12/08/15 15:35, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Evandro Menezes gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new

Re: [AArch64] Emit square root using the Newton series

2016-03-08 Thread Evandro Menezes
On 03/08/16 16:08, Evandro Menezes wrote: On 02/16/16 14:56, Evandro Menezes wrote: On 12/08/15 15:35, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Evandro Menezes gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new

Re: [AArch64] Emit square root using the Newton series

2016-03-08 Thread Evandro Menezes
On 02/16/16 14:56, Evandro Menezes wrote: On 12/08/15 15:35, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Evandro Menezes gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new function. * config/a

Re: [AArch64] Emit square root using the Newton series

2016-03-03 Thread Evandro Menezes
On 02/16/16 14:56, Evandro Menezes wrote: On 12/08/15 15:35, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Evandro Menezes gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new function. * config/a

Re: [AArch64] Emit square root using the Newton series

2016-02-26 Thread Evandro Menezes
On 02/26/16 17:42, Evandro Menezes wrote: On 02/26/16 08:59, James Greenhalgh wrote: On Mon, Feb 22, 2016 at 06:50:44PM -0600, Evandro Menezes wrote: In preparation for the patch adding the Newton series also for square root, I'd like to propose this patch changing the name of the existing tuni

Re: [AArch64] Emit square root using the Newton series

2016-02-26 Thread Evandro Menezes
On 02/26/16 08:59, James Greenhalgh wrote: On Mon, Feb 22, 2016 at 06:50:44PM -0600, Evandro Menezes wrote: In preparation for the patch adding the Newton series also for square root, I'd like to propose this patch changing the name of the existing tuning flag for the reciprocal square root. Th

Re: [AArch64] Emit square root using the Newton series

2016-02-26 Thread James Greenhalgh
On Mon, Feb 22, 2016 at 06:50:44PM -0600, Evandro Menezes wrote: > In preparation for the patch adding the Newton series also for > square root, I'd like to propose this patch changing the name of the > existing tuning flag for the reciprocal square root. This is fine, other names like sw_rsqrt, e

Re: [AArch64] Emit square root using the Newton series

2016-02-22 Thread Evandro Menezes
On 12/10/15 04:30, Kyrill Tkachov wrote: On 09/12/15 18:50, Evandro Menezes wrote: On 12/09/2015 11:16 AM, Kyrill Tkachov wrote: On 09/12/15 17:02, Kyrill Tkachov wrote: On 09/12/15 16:59, Evandro Menezes wrote: On 12/09/2015 10:52 AM, Kyrill Tkachov wrote: Hi Evandro, On 08/12/15 21:35,

Re: [AArch64] Emit square root using the Newton series

2016-02-16 Thread Evandro Menezes
On 12/08/15 15:35, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Evandro Menezes gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new function. * config/aarch64/aarch64-simd.md (sqrt2): New expa

Re: [AArch64] Emit square root using the Newton series

2015-12-10 Thread Kyrill Tkachov
On 09/12/15 18:50, Evandro Menezes wrote: On 12/09/2015 11:16 AM, Kyrill Tkachov wrote: On 09/12/15 17:02, Kyrill Tkachov wrote: On 09/12/15 16:59, Evandro Menezes wrote: On 12/09/2015 10:52 AM, Kyrill Tkachov wrote: Hi Evandro, On 08/12/15 21:35, Evandro Menezes wrote: Emit square root

Re: [AArch64] Emit square root using the Newton series

2015-12-09 Thread Evandro Menezes
On 12/09/2015 11:16 AM, Kyrill Tkachov wrote: On 09/12/15 17:02, Kyrill Tkachov wrote: On 09/12/15 16:59, Evandro Menezes wrote: On 12/09/2015 10:52 AM, Kyrill Tkachov wrote: Hi Evandro, On 08/12/15 21:35, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Evan

Re: [AArch64] Emit square root using the Newton series

2015-12-09 Thread Kyrill Tkachov
On 09/12/15 17:02, Kyrill Tkachov wrote: On 09/12/15 16:59, Evandro Menezes wrote: On 12/09/2015 10:52 AM, Kyrill Tkachov wrote: Hi Evandro, On 08/12/15 21:35, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Evandro Menezes gcc/ * config/aarc

Re: [AArch64] Emit square root using the Newton series

2015-12-09 Thread Kyrill Tkachov
On 09/12/15 16:59, Evandro Menezes wrote: On 12/09/2015 10:52 AM, Kyrill Tkachov wrote: Hi Evandro, On 08/12/15 21:35, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Evandro Menezes gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt)

Re: [AArch64] Emit square root using the Newton series

2015-12-09 Thread Evandro Menezes
On 12/09/2015 10:52 AM, Kyrill Tkachov wrote: Hi Evandro, On 08/12/15 21:35, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Evandro Menezes gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new function.

Re: [AArch64] Emit square root using the Newton series

2015-12-09 Thread Kyrill Tkachov
Hi Evandro, On 08/12/15 21:35, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Evandro Menezes gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new function. * config/aarch64/aarch64-simd.md (sqrt2)

RE: [AArch64] Emit square root using the Newton series

2015-12-09 Thread Evandro Menezes
GCC Patches; Marcus Shawcroft; James Greenhalgh; Andrew Pinski; Benedikt > Huber; philipp.toms...@theobroma-systems.com > Subject: Re: [AArch64] Emit square root using the Newton series > > On 8 December 2015 at 21:35, Evandro Menezes wrote: > >Emit square root using the Newt

Re: [AArch64] Emit square root using the Newton series

2015-12-09 Thread Marcus Shawcroft
On 8 December 2015 at 21:35, Evandro Menezes wrote: >Emit square root using the Newton series > >2015-12-03 Evandro Menezes > >gcc/ > * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): >Declare new > function. > * config/aarch64/aarch64-