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
        uxtw    x0, w0
        ret

With the patch we can merge the zero-extend and reduce the sequence to one 
instruction at -O2

f7:
        fcvtzu  x0, d0
        ret
        
Bootstrapped and regression tested on aarch64-linux-gnu. Okay for trunk?

2018-05-15  Michael Collison  <michael.colli...@arm.com>

        * config/aarch64/aarch64.md:
        (*fix_to_zero_extenddfdi2): New pattern.
        * gcc.target/aarch64/fix_extend1.c: New testcase.

Attachment: gnutools-6527-pt1.patch
Description: gnutools-6527-pt1.patch

Reply via email to