re PR target/60203 (Support long double/_Decimal128 direct move on power8)
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr60203.c
blob6a4b4fa1ddbc2e2ba59244b8ab29e9b0bf76c763
1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3 /* { dg-require-effective-target powerpc_p8vector_ok } */
4 /* { dg-options "-mcpu=power8 -O3" } */
6 union u_ld { long double ld; double d[2]; };
8 long double
9 pack (double a, double aa)
11 union u_ld u;
12 u.d[0] = a;
13 u.d[1] = aa;
14 return u.ld;
17 double
18 unpack_0 (long double x)
20 union u_ld u;
21 u.ld = x;
22 return u.d[0];
25 double
26 unpack_1 (long double x)
28 union u_ld u;
29 u.ld = x;
30 return u.d[1];
33 /* { dg-final { scan-assembler-not "stfd" } } */
34 /* { dg-final { scan-assembler-not "lfd" } } */
35 /* { dg-final { scan-assembler-not "lxsdx" } } */
36 /* { dg-final { scan-assembler-not "stxsdx" } } */
37 /* { dg-final { scan-assembler-not "mfvsrd" } } */
38 /* { dg-final { scan-assembler-not "mtvsrd" } } */