[RS6000] Tests that use int128_t and -m32
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / p9-xxbr-2.c
bloba14ac68f1c5697169fadd7e8b3cc8f2e3e438bfa
1 /* { dg-do compile { target lp64 } } */
2 /* { dg-require-effective-target powerpc_p9vector_ok } */
3 /* { dg-options "-mdejagnu-cpu=power9 -O2" } */
5 #include <altivec.h>
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. */
10 vector long
11 rev_long (vector long a)
13 return vec_revb (a); /* XXBRD. */
16 vector unsigned long
17 rev_ulong (vector unsigned long a)
19 return vec_revb (a); /* XXBRD. */
22 vector long long
23 rev_long_long (vector long long a)
25 return vec_revb (a); /* XXBRD. */
28 vector bool long long
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. */
40 vector __int128_t
41 rev_int128 (vector __int128_t a)
43 return vec_revb (a); /* XXBRQ. */
46 vector __uint128_t
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 } } */