[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-cmp.c
blob537630899bd092450cc913d844226d0edbe5ad8c
1 /* { dg-do compile { target lp64 } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-options "-O2 -mdejagnu-cpu=power8 -mvsx" } */
5 /* { dg-final { scan-assembler-times "vcmpgtsb" 4 } } */
6 /* { dg-final { scan-assembler-times "vcmpgtub" 4 } } */
7 /* { dg-final { scan-assembler-times "vcmpgtsh" 4 } } */
8 /* { dg-final { scan-assembler-times "vcmpgtuh" 4 } } */
9 /* { dg-final { scan-assembler-times "vcmpgtsw" 4 } } */
10 /* { dg-final { scan-assembler-times "vcmpgtuw" 4 } } */
11 /* { dg-final { scan-assembler-times "vcmpgtsd" 4 } } */
12 /* { dg-final { scan-assembler-times "vcmpgtud" 4 } } */
13 /* { dg-final { scan-assembler-times "xxlnor" 16 } } */
15 #include <altivec.h>
17 vector bool char
18 cmple_sc (vector signed char x, vector signed char y)
20 return vec_cmple (x, y);
23 vector bool char
24 cmple_uc (vector unsigned char x, vector unsigned char y)
26 return vec_cmple (x, y);
29 vector bool short
30 cmple_ss (vector signed short x, vector signed short y)
32 return vec_cmple (x, y);
35 vector bool short
36 cmple_us (vector unsigned short x, vector unsigned short y)
38 return vec_cmple (x, y);
41 vector bool int
42 cmple_si (vector signed int x, vector signed int y)
44 return vec_cmple (x, y);
47 vector bool int
48 cmple_ui (vector unsigned int x, vector unsigned int y)
50 return vec_cmple (x, y);
53 vector bool long long
54 cmple_sl (vector signed long long x, vector signed long long y)
56 return vec_cmple (x, y);
59 vector bool long long
60 cmple_ul (vector unsigned long long x, vector unsigned long long y)
62 return vec_cmple (x, y);
65 vector bool int
66 cmple_f (vector float x, vector float y)
68 return vec_cmple (x, y);
71 vector bool long long int
72 cmple_d (vector double x, vector double y)
74 return vec_cmple (x, y);
77 vector bool char
78 cmpge_sc (vector signed char x, vector signed char y)
80 return vec_cmpge (x, y);
83 vector bool char
84 cmpge_uc (vector unsigned char x, vector unsigned char y)
86 return vec_cmpge (x, y);
89 vector bool short
90 cmpge_ss (vector signed short x, vector signed short y)
92 return vec_cmpge (x, y);
95 vector bool short
96 cmpge_us (vector unsigned short x, vector unsigned short y)
98 return vec_cmpge (x, y);
101 vector bool int
102 cmpge_si (vector signed int x, vector signed int y)
104 return vec_cmpge (x, y);
107 vector bool int
108 cmpge_ui (vector unsigned int x, vector unsigned int y)
110 return vec_cmpge (x, y);
113 vector bool long long
114 cmpge_sl (vector signed long long x, vector signed long long y)
116 return vec_cmpge (x, y);
119 vector bool long long
120 cmpge_ul (vector unsigned long long x, vector unsigned long long y)
122 return vec_cmpge (x, y);
125 vector bool int
126 cmpge_f (vector float x, vector float y)
128 return vec_cmpge (x, y);
131 vector bool long long int
132 cmpge_d (vector double x, vector double y)
134 return vec_cmpge (x, y);
137 vector bool int
138 cmpgt_ui (vector unsigned int x, vector unsigned int y)
140 return vec_cmpgt (x, y);
143 vector bool int
144 cmpgt_f (vector float x, vector float y)
146 return vec_cmpgt (x, y);
149 vector bool long long int
150 cmpgt_d (vector double x, vector double y)
152 return vec_cmpgt (x, y);
155 vector bool long long
156 cmpgt_sl (vector signed long long x, vector signed long long y)
158 return vec_cmpgt (x, y);
161 vector bool long long
162 cmpgt_ul (vector unsigned long long x, vector unsigned long long y)
164 return vec_cmpgt (x, y);
167 vector bool char
168 cmpgt_sc (vector signed char x, vector signed char y)
170 return vec_cmpgt (x, y);
173 vector bool char
174 cmpgt_uc (vector unsigned char x, vector unsigned char y)
176 return vec_cmpgt (x, y);
179 vector bool short
180 cmpgt_ss (vector signed short x, vector signed short y)
182 return vec_cmpgt (x, y);
185 vector bool short
186 cmpgt_us (vector unsigned short x, vector unsigned short y)
188 return vec_cmpgt (x, y);
191 vector bool int
192 cmpgt_si (vector signed int x, vector signed int y)
194 return vec_cmpgt (x, y);
197 vector bool int
198 cmplt_ui (vector unsigned int x, vector unsigned int y)
200 return vec_cmplt (x, y);
203 vector bool int
204 cmplt_f (vector float x, vector float y)
206 return vec_cmplt (x, y);
209 vector bool long long int
210 cmplt_d (vector double x, vector double y)
212 return vec_cmplt (x, y);
215 vector bool long long
216 cmplt_sl (vector signed long long x, vector signed long long y)
218 return vec_cmplt (x, y);
221 vector bool long long
222 cmplt_ul (vector unsigned long long x, vector unsigned long long y)
224 return vec_cmplt (x, y);
227 vector bool char
228 cmplt_sc (vector signed char x, vector signed char y)
230 return vec_cmplt (x, y);
233 vector bool char
234 cmplt_uc (vector unsigned char x, vector unsigned char y)
236 return vec_cmplt (x, y);
239 vector bool short
240 cmplt_ss (vector signed short x, vector signed short y)
242 return vec_cmplt (x, y);
245 vector bool short
246 cmplt_us (vector unsigned short x, vector unsigned short y)
248 return vec_cmplt (x, y);
251 vector bool int
252 cmplt_si (vector signed int x, vector signed int y)
254 return vec_cmplt (x, y);