Re: [PATCH 1/2][Aarch64] Improve FP to int conversions

2018-05-21 Thread Richard Earnshaw (lists)
On 18/05/18 21:34, Michael Collison wrote: > This patch improves additional cases of FP to integer conversions. > > Example 1: > > unsigned long > f7 (double x) > { > return (unsigned) y; > } > > > At -O2 > > Trunk generates: > > f7: > fcvtzu w0, d0 > uxtwx0, w0 > ret

Re: [PATCH 1/2][Aarch64] Improve FP to int conversions

2018-05-19 Thread Richard Sandiford
Michael Collison writes: > This patch improves additional cases of FP to integer conversions. > > Example 1: > > unsigned long > f7 (double x) > { > return (unsigned) y; > } > > > At -O2 > > Trunk generates: > > f7: > fcvtzu w0, d0 > uxtwx0, w0 > ret > > With the patch we

[PATCH 1/2][Aarch64] Improve FP to int conversions

2018-05-18 Thread Michael Collison
This patch improves additional cases of FP to integer conversions. Example 1: unsigned long f7 (double x) { return (unsigned) y; } At -O2 Trunk generates: f7: fcvtzu w0, d0 uxtwx0, w0 ret With the patch we can merge the zero-extend and reduce the sequence to on