Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / gcc.target / powerpc / pr60676.c
blob86fd8c6d2e3624138d1b33a66f7d1847ae33937c
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-options "-O3 -mcpu=power7" } */
5 /* { dg-final { scan-assembler "xxsldwi" } } */
6 /* { dg-final { scan-assembler "xxpermdi" } } */
8 #include <altivec.h>
10 vector double
11 v2df_shift (vector double a, vector double b)
13 return vec_xxsldwi (a, b, 1);
16 vector float
17 v4sf_shift (vector float a, vector float b)
19 return vec_xxsldwi (a, b, 1);
22 vector long long
23 v2di_shift (vector long long a, vector long long b)
25 return vec_xxsldwi (a, b, 1);
28 vector unsigned long long
29 v2diu_shift (vector unsigned long long a, vector unsigned long long b)
31 return vec_xxsldwi (a, b, 1);
34 vector int
35 v4si_shift (vector int a, vector int b)
37 return vec_xxsldwi (a, b, 1);
40 vector unsigned int
41 v4siu_shift (vector unsigned int a, vector unsigned int b)
43 return vec_xxsldwi (a, b, 1);
46 vector short
47 v8hi_shift (vector short a, vector short b)
49 return vec_xxsldwi (a, b, 1);
52 vector unsigned short
53 v8hiu_shift (vector unsigned short a, vector unsigned short b)
55 return vec_xxsldwi (a, b, 1);
58 vector signed char
59 v16qi_shift (vector signed char a, vector signed char b)
61 return vec_xxsldwi (a, b, 1);
64 vector unsigned char
65 v16qiu_shift (vector unsigned char a, vector unsigned char b)
67 return vec_xxsldwi (a, b, 1);
70 vector double
71 v2df_permute (vector double a, vector double b)
73 return vec_xxpermdi (a, b, 1);
76 vector float
77 v4sf_permute (vector float a, vector float b)
79 return vec_xxpermdi (a, b, 1);
82 vector long long
83 v2di_permute (vector long long a, vector long long b)
85 return vec_xxpermdi (a, b, 1);
88 vector unsigned long long
89 v2diu_permute (vector unsigned long long a, vector unsigned long long b)
91 return vec_xxpermdi (a, b, 1);
94 vector int
95 v4si_permute (vector int a, vector int b)
97 return vec_xxpermdi (a, b, 1);
100 vector unsigned int
101 v4siu_permute (vector unsigned int a, vector unsigned int b)
103 return vec_xxpermdi (a, b, 1);
106 vector short
107 v8hi_permute (vector short a, vector short b)
109 return vec_xxpermdi (a, b, 1);
112 vector unsigned short
113 v8hiu_permute (vector unsigned short a, vector unsigned short b)
115 return vec_xxpermdi (a, b, 1);
118 vector signed char
119 v16qi_permute (vector signed char a, vector signed char b)
121 return vec_xxpermdi (a, b, 1);
124 vector unsigned char
125 v16qiu_permute (vector unsigned char a, vector unsigned char b)
127 return vec_xxpermdi (a, b, 1);