1 /* { dg-do run { target powerpc64*-*-* } } */
2 /* { dg-require-effective-target p8vector_hw } */
3 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
4 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
5 /* { dg-options "-mcpu=power8" } */
12 static void test (void);
14 static void check (int result
, const char *name
)
19 printf ("fail %s\n", name
);
31 vector
double x
= { 81.0, 76.0 };
32 vector
long long y
= { 81, 76 };
36 vector
long long a
= vec_cts (x
, 0);
37 vector
double b
= vec_ctf (a
, 0);
38 vector
long long c
= __builtin_vsx_xvcvdpuxds_scale (x
, 0);
39 vector
double d
= vec_ctf (c
, 0);
40 check (vec_all_eq (a
, y
), "vec_cts");
41 check (vec_all_eq (b
, x
), "vec_ctf");
42 check (vec_all_eq (c
, y
), "xvcvdpuxds");
43 check (vec_all_eq (d
, x
), "vec_ctf unsigned");