summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/p9-fpcvt-2.c
blob: 2d615f8203b30faf8e027d4f5b180588f3d2b0b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mcpu=power9 -O2" } */

double sc (signed char    *p) { return (double)*p; }
double uc (unsigned char  *p) { return (double)*p; }
double ss (signed short   *p) { return (double)*p; }
double us (unsigned short *p) { return (double)*p; }

/* { dg-final { scan-assembler     "lxsibzx"  } } */
/* { dg-final { scan-assembler     "lxsihzx"  } } */
/* { dg-final { scan-assembler     "vextsb2d" } } */
/* { dg-final { scan-assembler     "vextsh2d" } } */
/* { dg-final { scan-assembler-not "mfvsrd"   } } */
/* { dg-final { scan-assembler-not "mfvsrwz"  } } */
/* { dg-final { scan-assembler-not "mtvsrd"   } } */
/* { dg-final { scan-assembler-not "mtvsrwa"  } } */
/* { dg-final { scan-assembler-not "mtvsrwz"  } } */