Re: [PATCH 2/3][AArch64] Emit square root using the Newton series

2016-06-13 Thread James Greenhalgh
en_aarch64_rsqrts_v4sf3; > -default: gcc_unreachable (); > +default: gcc_unreachable (); >} > } You'll find these two hunks hit a merge conflict on trunk after Jiong's recent changes to these pattern names. Just be careful when applying the patch. The patch is OK for trunk.

Re: [PATCH 2/3][AArch64] Emit square root using the Newton series

2016-06-03 Thread Evandro Menezes
t should be changed accordingly, yes? +This is only relevant if @option{-ffast-math} enables the square root +approximation. + @item -march=@var{name} @opindex march Specify the name of the target architecture and, optionally, one or Thank you, -- Evandro Menezes >From 5c5c07f38cb06507

Re: [PATCH 2/3][AArch64] Emit square root using the Newton series

2016-06-01 Thread James Greenhalgh
On Fri, May 27, 2016 at 05:57:26PM -0500, Evandro Menezes wrote: > 2016-04-04 Evandro Menezes > Wilco Dijkstra > > gcc/ > * config/aarch64/aarch64-protos.h > (aarch64_emit_approx_rsqrt): Replace with new function >

Re: [PATCH 2/3][AArch64] Emit square root using the Newton series

2016-05-27 Thread Evandro Menezes
are not accurate, I prefer to let the user decide which of them may be relaxed. Again, I lean towards the way done for RS6000. Thank you, -- Evandro Menezes >From 42e1a3d1289ba3951d3b9a7fd523422b6c0e56c8 Mon Sep 17 00:00:00 2001 From: Evandro Menezes <e.mene...@samsung

Re: [PATCH 2/3][AArch64] Emit square root using the Newton series

2016-05-25 Thread James Greenhalgh
On Wed, Apr 27, 2016 at 04:15:45PM -0500, Evandro Menezes wrote: >gcc/ > * config/aarch64/aarch64-protos.h > (aarch64_emit_approx_rsqrt): Replace with new function > "aarch64_emit_approx_sqrt". > (tune_params): New member "approx_sqrt_modes". > *

[PATCH 2/3][AArch64] Emit square root using the Newton series

2016-04-27 Thread Evandro Menezes
Sep 17 00:00:00 2001 From: Evandro Menezes <e.mene...@samsung.com> Date: Mon, 4 Apr 2016 11:23:29 -0500 Subject: [PATCH 2/3] [AArch64] Emit square root using the Newton series 2016-04-04 Evandro Menezes <e.mene...@samsung.com> Wilco Dijkstra <wilco.

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

2016-04-27 Thread Evandro Menezes
for the reciprocal square root approximation [PATCH 2/3 AArch64] Emit square root using the Newton series [PATCH 3/3 AArch64] Emit division using the Newton series One patch per email, with the dependencies explicit like this, is infinitely easier to follow than the current structure of your

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

2016-04-27 Thread James Greenhalgh
/3 AArch64] Add infrastructure for more approximate FP operations [PATCH 1/3 AArch64] Add more choices for the reciprocal square root approximation [PATCH 2/3 AArch64] Emit square root using the Newton series [PATCH 3/3 AArch64] Emit division using the Newton series One patch per email, with

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

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

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

2016-04-05 Thread Evandro Menezes
f @option{-ffast-math} enables the square root approximation. +@item -mlow-precision-div +@item -mno-low-precision-div +@opindex -mlow-precision-div +@opindex -mno-low-precision-div +When calculating the division approximation, +uses one less step than otherwise, thus reducing latency and precisio

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

2016-04-04 Thread Evandro Menezes
this patch gets close to what all have in mind. [AArch64] Emit square root using the Newton series 2016-04-04 Evandro Menezes <e.mene...@samsung.com> Wilco Dijkstra <wilco.dijks...@arm.com> gcc/ * config/aarch64/aarc

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

2016-04-01 Thread Evandro Menezes
introduced in it since the first proposal. [AArch64] Emit square root using the Newton series 2016-03-30 Evandro Menezes <e.mene...@samsung.com> Wilco Dijkstra <wilco.dijks...@arm.com> gcc/ * config/aarch64/aarc

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

2016-03-24 Thread Evandro Menezes
es <e.mene...@samsung.com> Date: Thu, 17 Mar 2016 17:39:55 -0500 Subject: [PATCH] [AArch64] Emit square root using the Newton series 2016-03-23 Evandro Menezes <e.mene...@samsung.com> Wilco Dijkstra <wilco.dijks...@arm.com> gcc/ * config/aarch64/aarch64-tuning-fla

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 > >>> &g

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

Emit square root using the Newton series

2016-03-19 Thread Evandro Menezes
: Evandro Menezes <e.mene...@samsung.com> Date: Thu, 17 Mar 2016 17:39:55 -0500 Subject: [PATCH] Emit square root using the Newton series 2016-03-17 Evandro Menezes <e.mene...@samsung.com> Wilco Dijkstra <wilco.dijks...@arm.com> gcc/ * config/aarch64/aarch64-tuning-

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 <e.mene...@samsung.com> gcc/ * config/aarch64/aarch64-pr

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

2016-03-18 Thread Evandro Menezes
atency is higher - according to exynos-1.md the above takes 44 cycles while my version would be 37. Emit square root using the Newton series 2016-03-16 Evandro Menezes <e.mene...@samsung.com> Wilco Dijkstra <wilco.dijks...@arm.co

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

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,

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

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

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

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 <e.mene...@samsung.com> gcc/ * config/aarch64/aarch64-pr

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 <e.mene...@samsung.com> gcc/ * config/aarch64/aarch64-pr

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 <e.mene...@samsung.com> gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new fu

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 <e.mene...@samsung.com> gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new fu

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

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.

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,

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

2016-02-22 Thread Evandro Menezes
, Evandro Menezes wrote: Emit square root using the Newton series 2015-12-03 Evandro Menezes <e.mene...@samsung.com> 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

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 <e.mene...@samsung.com> gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new function. * config/aarch64/a

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 Marcus Shawcroft
On 8 December 2015 at 21:35, Evandro Menezes <e.mene...@samsung.com> wrote: >Emit square root using the Newton series > >2015-12-03 Evandro Menezes <e.mene...@samsung.com> > >gcc/ > * config/aarch64/aarch64-protos.h (aarch64_

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

2015-12-09 Thread Evandro Menezes
arcus 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 <e.mene...@samsung.com> wrote: > >Emit square root

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 <e.mene...@samsung.com> gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new function. * config/a

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 <e.mene...@samsung.com>

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

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 <e.mene...@samsung.com> gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Decla

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 <e.mene...@samsung.com> gcc/ * config/aarch64/a

[AArch64] Emit square root using the Newton series

2015-12-08 Thread Evandro Menezes
Emit square root using the Newton series 2015-12-03 Evandro Menezes <e.mene...@samsung.com> gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new function. * config/aarch64/aarch64-simd.md (sqrt2): New exp