1 /* { dg-do compile { target lp64 } } */
2 /* { dg-require-effective-target powerpc_vsx_ok } */
3 /* { dg-options "-mdejagnu-cpu=power9 -mvsx -O2" } */
7 /* Verify P9 vec_revb builtin generates the XXBR{Q,D,W,H} instructions. This
8 test only tests the vector types that need a 64-bit environment. */
11 rev_long (vector
long a
)
13 return vec_revb (a
); /* XXBRD. */
17 rev_ulong (vector
unsigned long a
)
19 return vec_revb (a
); /* XXBRD. */
23 rev_long_long (vector
long long a
)
25 return vec_revb (a
); /* XXBRD. */
29 rev_bool_long_long (vector
bool long long a
)
31 return vec_revb (a
); /* XXBRD. */
34 vector
unsigned long long
35 rev_ulong_ulong (vector
unsigned long long a
)
37 return vec_revb (a
); /* XXBRD. */
41 rev_int128 (vector __int128_t a
)
43 return vec_revb (a
); /* XXBRQ. */
47 rev_uint128 (vector __uint128_t a
)
49 return vec_revb (a
); /* XXBRQ. */
52 /* { dg-final { scan-assembler-times "xxbrd" 5 } } */
53 /* { dg-final { scan-assembler-times "xxbrq" 2 } } */