Re: [PATCH][AArch64][1/2] Add fmul-by-power-of-2+fcvt optimisation

2015-10-20 Thread Marcus Shawcroft
On 20 October 2015 at 17:31, Kyrill Tkachov wrote: > > On 20/10/15 17:28, Ramana Radhakrishnan wrote: >> >> On Tue, Oct 20, 2015 at 4:26 PM, Marcus Shawcroft >> wrote: >>> >>> On 19 October 2015 at 14:57, Kyrill Tkachov >>> wrote: >>> 2015-10-19 Kyrylo Tkachov * config/aar

Re: [PATCH][AArch64][1/2] Add fmul-by-power-of-2+fcvt optimisation

2015-10-20 Thread Kyrill Tkachov
On 20/10/15 17:28, Ramana Radhakrishnan wrote: On Tue, Oct 20, 2015 at 4:26 PM, Marcus Shawcroft wrote: On 19 October 2015 at 14:57, Kyrill Tkachov wrote: 2015-10-19 Kyrylo Tkachov * config/aarch64/aarch64.md (*aarch64_fcvt2_mult): New pattern. * config/aarch64/aarch64-simd.

Re: [PATCH][AArch64][1/2] Add fmul-by-power-of-2+fcvt optimisation

2015-10-20 Thread Ramana Radhakrishnan
On Tue, Oct 20, 2015 at 4:26 PM, Marcus Shawcroft wrote: > On 19 October 2015 at 14:57, Kyrill Tkachov wrote: > >> 2015-10-19 Kyrylo Tkachov >> >> * config/aarch64/aarch64.md >> (*aarch64_fcvt2_mult): New pattern. >> * config/aarch64/aarch64-simd.md >> (*aarch64_fcvt2_mult): Likewise

Re: [PATCH][AArch64][1/2] Add fmul-by-power-of-2+fcvt optimisation

2015-10-20 Thread Marcus Shawcroft
On 20 October 2015 at 16:47, Kyrill Tkachov wrote: > Here's the patch updated as per your feedback. > > How's this? > > Thanks, > Kyrill > > 2015-10-20 Kyrylo Tkachov > > * config/aarch64/aarch64.md > (*aarch64_fcvt2_mult): New pattern. > * config/aarch64/aarch64-simd.md > (*aarch64_fc

Re: [PATCH][AArch64][1/2] Add fmul-by-power-of-2+fcvt optimisation

2015-10-20 Thread Kyrill Tkachov
On 20/10/15 16:26, Marcus Shawcroft wrote: On 19 October 2015 at 14:57, Kyrill Tkachov wrote: 2015-10-19 Kyrylo Tkachov * config/aarch64/aarch64.md (*aarch64_fcvt2_mult): New pattern. * config/aarch64/aarch64-simd.md (*aarch64_fcvt2_mult): Likewise. * config/aarch64/aar

Re: [PATCH][AArch64][1/2] Add fmul-by-power-of-2+fcvt optimisation

2015-10-20 Thread Marcus Shawcroft
On 19 October 2015 at 14:57, Kyrill Tkachov wrote: > 2015-10-19 Kyrylo Tkachov > > * config/aarch64/aarch64.md > (*aarch64_fcvt2_mult): New pattern. > * config/aarch64/aarch64-simd.md > (*aarch64_fcvt2_mult): Likewise. > * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle abov

[PATCH][AArch64][1/2] Add fmul-by-power-of-2+fcvt optimisation

2015-10-19 Thread Kyrill Tkachov
Hi all, The fcvtzs and fcvtzu instructions have a form where they convert to a fixed-point form with a specified number of fractional bits. In practice this has the effect of multiplying the floating point argument by 2^ and then converting the result to integer. We can exploit that behaviour d