1 /* Verify that overloaded built-ins for vec_perm with long long
2 inputs produce the right code. */
3
4 /* { dg-do compile {target lp64} } */
5 // 'long long' in Altivec types is invalid without -mvsx.
6 /* { dg-require-effective-target powerpc_vsx_ok } */
7 /* { dg-options "-mvsx -O2" } */
8
9 #include <altivec.h>
10
11 vector bool long long
12 testbl (vector bool long long vbl2, vector bool long long vbl3,
13 vector unsigned char vuc)
14 {
15 return vec_perm (vbl2, vbl3, vuc);
16 }
17
18 vector signed long long
19 testsl (vector signed long long vsl2, vector signed long long vsl3,
20 vector unsigned char vuc)
21 {
22 return vec_perm (vsl2, vsl3, vuc);
23 }
24
25 vector unsigned long long
26 testul (vector unsigned long long vul2, vector unsigned long long vul3,
27 vector unsigned char vuc)
28 {
29 return vec_perm (vul2, vul3, vuc);
30 }
31
32 /* { dg-final { scan-assembler-times {\m(?:v|xx)permr?\M} 3 } } */