Re: [PATCH 2/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 with > -ffast-math enabled. > > Example 1: > > double > f5 (int x) > { > return (double)(float) x; > } > > > At -O2 with -ffast-math > > Trunk generates: > > f5: > scvtf s0, w0 > fcvtd

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

2018-05-18 Thread Michael Collison
This patch improves additional cases of FP to integer conversions with -ffast-math enabled. Example 1: double f5 (int x) { return (double)(float) x; } At -O2 with -ffast-math Trunk generates: f5: scvtf s0, w0 fcvtd0, s0 ret With the patch we can merge the co