Re: [AArch64] Emit division using the Newton series

2016-04-27 Thread Evandro Menezes
On 04/27/16 09:15, James Greenhalgh wrote: So this is off for all cores currently supported by GCC? I'm not sure I understand why we should take this if it will immediately be dead code? Excuse me? Not only are other target maintainers free to evaluate if this code is useful to them, but so

Re: [AArch64] Emit division using the Newton series

2016-04-27 Thread Wilco Dijkstra
James Greenhalgh wrote: > So this is off for all cores currently supported by GCC? > > I'm not sure I understand why we should take this if it will immediately > be dead code? I presume it was meant to have the vector variants enabled with -mcpu=exynos-m1 as that is where you can get a good gain

Re: [AArch64] Emit division using the Newton series

2016-04-27 Thread James Greenhalgh
> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c > index b7086dd..21af809 100644 > --- a/gcc/config/aarch64/aarch64.c > +++ b/gcc/config/aarch64/aarch64.c > @@ -414,7 +414,8 @@ static const struct tune_params generic_tunings = >0, /* max_case_values. */ >0, /* cac

RE: [AArch64] Emit division using the Newton series

2016-04-21 Thread Evandro Menezes
> On 04/04/16 14:06, Evandro Menezes wrote: > > On 04/01/16 17:52, Evandro Menezes wrote: > >> On 04/01/16 17:45, Wilco Dijkstra wrote: > >>> Evandro Menezes wrote: > >>> > However, I don't think that there's the need to handle any special > case for division. The only case when the appr

Re: [AArch64] Emit division using the Newton series

2016-04-12 Thread Evandro Menezes
On 04/04/16 14:06, Evandro Menezes wrote: On 04/01/16 17:52, Evandro Menezes wrote: On 04/01/16 17:45, Wilco Dijkstra wrote: Evandro Menezes wrote: However, I don't think that there's the need to handle any special case for division. The only case when the approximation differs from divisio

Re: [AArch64] Emit division using the Newton series

2016-04-04 Thread Evandro Menezes
On 04/01/16 17:52, Evandro Menezes wrote: On 04/01/16 17:45, Wilco Dijkstra wrote: Evandro Menezes wrote: However, I don't think that there's the need to handle any special case for division. The only case when the approximation differs from division is when the numerator is infinity and the

Re: [AArch64] Emit division using the Newton series

2016-04-01 Thread Evandro Menezes
On 04/01/16 17:45, Wilco Dijkstra wrote: Evandro Menezes wrote: However, I don't think that there's the need to handle any special case for division. The only case when the approximation differs from division is when the numerator is infinity and the denominator, zero, when the approximation r

Re: [AArch64] Emit division using the Newton series

2016-04-01 Thread Wilco Dijkstra
Evandro Menezes wrote: > However, I don't think that there's the need to handle any special case > for division. The only case when the approximation differs from > division is when the numerator is infinity and the denominator, zero, > when the approximation returns infinity and the division, NA

Re: [AArch64] Emit division using the Newton series

2016-04-01 Thread Evandro Menezes
On 04/01/16 16:22, Wilco Dijkstra wrote: Evandro Menezes wrote: The division variant should use the same latency reduction trick I mentioned for sqrt. I don't think that it applies here, since it doesn't have to deal with special cases. No it applies as it's exactly the same calculation: x *

Re: [AArch64] Emit division using the Newton series

2016-04-01 Thread Wilco Dijkstra
Evandro Menezes wrote: > > The division variant should use the same latency reduction trick I > > mentioned for sqrt. > > I don't think that it applies here, since it doesn't have to deal with > special cases. No it applies as it's exactly the same calculation: x * rsqrt(y) and x * recip(y). In

Re: [AArch64] Emit division using the Newton series

2016-04-01 Thread Evandro Menezes
On 04/01/16 08:58, Wilco Dijkstra wrote: Evandro Menezes wrote: On 03/23/16 11:24, Evandro Menezes wrote: On 03/17/16 15:09, Evandro Menezes wrote: This patch implements FP division by an approximation using the Newton series. With this patch, DF division is sped up by over 100% and SF divisio

Re: [AArch64] Emit division using the Newton series

2016-04-01 Thread Wilco Dijkstra
Evandro Menezes wrote: On 03/23/16 11:24, Evandro Menezes wrote: > On 03/17/16 15:09, Evandro Menezes wrote: >> This patch implements FP division by an approximation using the Newton >> series. >> >> With this patch, DF division is sped up by over 100% and SF division, >> zilch, both on A57 and on

Re: [AArch64] Emit division using the Newton series

2016-03-31 Thread Evandro Menezes
On 03/23/16 11:24, Evandro Menezes wrote: On 03/17/16 15:09, Evandro Menezes wrote: This patch implements FP division by an approximation using the Newton series. With this patch, DF division is sped up by over 100% and SF division, zilch, both on A57 and on M1. gcc/ * con

Re: [AArch64] Emit division using the Newton series

2016-03-23 Thread Evandro Menezes
On 03/17/16 15:09, Evandro Menezes wrote: This patch implements FP division by an approximation using the Newton series. With this patch, DF division is sped up by over 100% and SF division, zilch, both on A57 and on M1. gcc/ * config/aarch64/aarch64-tuning-flags.def

Re: [AArch64] Emit division using the Newton series

2016-03-23 Thread Evandro Menezes
On 03/17/16 15:09, Evandro Menezes wrote: This patch implements FP division by an approximation using the Newton series. With this patch, DF division is sped up by over 100% and SF division, zilch, both on A57 and on M1. gcc/ * config/aarch64/aarch64-tuning-flags.def