blob: 8afbacdf196102d334a33ffc46ea15f2eb854bed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/* { dg-do compile { target lp64 } } */
/* { dg-options "-mdejagnu-cpu=power9 -mvsx -O2" } */
/* { dg-require-effective-target powerpc_vsx } */
#include <altivec.h>
/* Verify P9 vec_revb builtin generates the XXBR{Q,D,W,H} instructions. This
test only tests the vector types that need a 64-bit environment. */
vector long
rev_long (vector long a)
{
return vec_revb (a); /* XXBRD. */
}
vector unsigned long
rev_ulong (vector unsigned long a)
{
return vec_revb (a); /* XXBRD. */
}
vector long long
rev_long_long (vector long long a)
{
return vec_revb (a); /* XXBRD. */
}
vector bool long long
rev_bool_long_long (vector bool long long a)
{
return vec_revb (a); /* XXBRD. */
}
vector unsigned long long
rev_ulong_ulong (vector unsigned long long a)
{
return vec_revb (a); /* XXBRD. */
}
vector __int128_t
rev_int128 (vector __int128_t a)
{
return vec_revb (a); /* XXBRQ. */
}
vector __uint128_t
rev_uint128 (vector __uint128_t a)
{
return vec_revb (a); /* XXBRQ. */
}
/* { dg-final { scan-assembler-times "xxbrd" 5 } } */
/* { dg-final { scan-assembler-times "xxbrq" 2 } } */
|