Merge from mainline (163495:164578).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / powerpc / ppc-fpconv-1.c
blob8a6cc08b90919d1e8b42c780c4f44f4ad62d3f4c
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-options "-O2 -mcpu=power7 -ffast-math" } */
5 /* { dg-final { scan-assembler-times "lfiwax" 2 } } */
6 /* { dg-final { scan-assembler-times "lfiwzx" 2 } } */
7 /* { dg-final { scan-assembler-times "fcfids" 3 } } */
8 /* { dg-final { scan-assembler-times "fcfidus" 1 } } */
9 /* { dg-final { scan-assembler-times "xscvsxddp" 3 } } */
10 /* { dg-final { scan-assembler-times "xscvuxddp" 1 } } */
12 void int_to_float (float *dest, int *src)
14 *dest = (float) *src;
17 void int_to_double (double *dest, int *src)
19 *dest = (double) *src;
22 void uint_to_float (float *dest, unsigned int *src)
24 *dest = (float) *src;
27 void uint_to_double (double *dest, unsigned int *src)
29 *dest = (double) *src;
32 void llong_to_float (float *dest, long long *src)
34 *dest = (float) *src;
37 void llong_to_double (double *dest, long long *src)
39 *dest = (double) *src;
42 void ullong_to_float (float *dest, unsigned long long *src)
44 *dest = (float) *src;
47 void ullong_to_double (double *dest, unsigned long long *src)
49 *dest = (double) *src;