| 1 |
/* { dg-do compile { target lp64 } } */ |
| 2 |
/* { dg-skip-if "" { powerpc*-*-darwin* } } */ |
| 3 |
/* { dg-options "-O2 -mdejagnu-cpu=power8 -mvsx" } */ |
| 4 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 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 } } */ |
| 14 |
|
| 15 |
#include <altivec.h> |
| 16 |
|
| 17 |
vector bool char |
| 18 |
cmple_sc (vector signed char x, vector signed char y) |
| 19 |
{ |
| 20 |
return vec_cmple (x, y); |
| 21 |
} |
| 22 |
|
| 23 |
vector bool char |
| 24 |
cmple_uc (vector unsigned char x, vector unsigned char y) |
| 25 |
{ |
| 26 |
return vec_cmple (x, y); |
| 27 |
} |
| 28 |
|
| 29 |
vector bool short |
| 30 |
cmple_ss (vector signed short x, vector signed short y) |
| 31 |
{ |
| 32 |
return vec_cmple (x, y); |
| 33 |
} |
| 34 |
|
| 35 |
vector bool short |
| 36 |
cmple_us (vector unsigned short x, vector unsigned short y) |
| 37 |
{ |
| 38 |
return vec_cmple (x, y); |
| 39 |
} |
| 40 |
|
| 41 |
vector bool int |
| 42 |
cmple_si (vector signed int x, vector signed int y) |
| 43 |
{ |
| 44 |
return vec_cmple (x, y); |
| 45 |
} |
| 46 |
|
| 47 |
vector bool int |
| 48 |
cmple_ui (vector unsigned int x, vector unsigned int y) |
| 49 |
{ |
| 50 |
return vec_cmple (x, y); |
| 51 |
} |
| 52 |
|
| 53 |
vector bool long long |
| 54 |
cmple_sl (vector signed long long x, vector signed long long y) |
| 55 |
{ |
| 56 |
return vec_cmple (x, y); |
| 57 |
} |
| 58 |
|
| 59 |
vector bool long long |
| 60 |
cmple_ul (vector unsigned long long x, vector unsigned long long y) |
| 61 |
{ |
| 62 |
return vec_cmple (x, y); |
| 63 |
} |
| 64 |
|
| 65 |
vector bool int |
| 66 |
cmple_f (vector float x, vector float y) |
| 67 |
{ |
| 68 |
return vec_cmple (x, y); |
| 69 |
} |
| 70 |
|
| 71 |
vector bool long long int |
| 72 |
cmple_d (vector double x, vector double y) |
| 73 |
{ |
| 74 |
return vec_cmple (x, y); |
| 75 |
} |
| 76 |
|
| 77 |
vector bool char |
| 78 |
cmpge_sc (vector signed char x, vector signed char y) |
| 79 |
{ |
| 80 |
return vec_cmpge (x, y); |
| 81 |
} |
| 82 |
|
| 83 |
vector bool char |
| 84 |
cmpge_uc (vector unsigned char x, vector unsigned char y) |
| 85 |
{ |
| 86 |
return vec_cmpge (x, y); |
| 87 |
} |
| 88 |
|
| 89 |
vector bool short |
| 90 |
cmpge_ss (vector signed short x, vector signed short y) |
| 91 |
{ |
| 92 |
return vec_cmpge (x, y); |
| 93 |
} |
| 94 |
|
| 95 |
vector bool short |
| 96 |
cmpge_us (vector unsigned short x, vector unsigned short y) |
| 97 |
{ |
| 98 |
return vec_cmpge (x, y); |
| 99 |
} |
| 100 |
|
| 101 |
vector bool int |
| 102 |
cmpge_si (vector signed int x, vector signed int y) |
| 103 |
{ |
| 104 |
return vec_cmpge (x, y); |
| 105 |
} |
| 106 |
|
| 107 |
vector bool int |
| 108 |
cmpge_ui (vector unsigned int x, vector unsigned int y) |
| 109 |
{ |
| 110 |
return vec_cmpge (x, y); |
| 111 |
} |
| 112 |
|
| 113 |
vector bool long long |
| 114 |
cmpge_sl (vector signed long long x, vector signed long long y) |
| 115 |
{ |
| 116 |
return vec_cmpge (x, y); |
| 117 |
} |
| 118 |
|
| 119 |
vector bool long long |
| 120 |
cmpge_ul (vector unsigned long long x, vector unsigned long long y) |
| 121 |
{ |
| 122 |
return vec_cmpge (x, y); |
| 123 |
} |
| 124 |
|
| 125 |
vector bool int |
| 126 |
cmpge_f (vector float x, vector float y) |
| 127 |
{ |
| 128 |
return vec_cmpge (x, y); |
| 129 |
} |
| 130 |
|
| 131 |
vector bool long long int |
| 132 |
cmpge_d (vector double x, vector double y) |
| 133 |
{ |
| 134 |
return vec_cmpge (x, y); |
| 135 |
} |
| 136 |
|
| 137 |
vector bool int |
| 138 |
cmpgt_ui (vector unsigned int x, vector unsigned int y) |
| 139 |
{ |
| 140 |
return vec_cmpgt (x, y); |
| 141 |
} |
| 142 |
|
| 143 |
vector bool int |
| 144 |
cmpgt_f (vector float x, vector float y) |
| 145 |
{ |
| 146 |
return vec_cmpgt (x, y); |
| 147 |
} |
| 148 |
|
| 149 |
vector bool long long int |
| 150 |
cmpgt_d (vector double x, vector double y) |
| 151 |
{ |
| 152 |
return vec_cmpgt (x, y); |
| 153 |
} |
| 154 |
|
| 155 |
vector bool long long |
| 156 |
cmpgt_sl (vector signed long long x, vector signed long long y) |
| 157 |
{ |
| 158 |
return vec_cmpgt (x, y); |
| 159 |
} |
| 160 |
|
| 161 |
vector bool long long |
| 162 |
cmpgt_ul (vector unsigned long long x, vector unsigned long long y) |
| 163 |
{ |
| 164 |
return vec_cmpgt (x, y); |
| 165 |
} |
| 166 |
|
| 167 |
vector bool char |
| 168 |
cmpgt_sc (vector signed char x, vector signed char y) |
| 169 |
{ |
| 170 |
return vec_cmpgt (x, y); |
| 171 |
} |
| 172 |
|
| 173 |
vector bool char |
| 174 |
cmpgt_uc (vector unsigned char x, vector unsigned char y) |
| 175 |
{ |
| 176 |
return vec_cmpgt (x, y); |
| 177 |
} |
| 178 |
|
| 179 |
vector bool short |
| 180 |
cmpgt_ss (vector signed short x, vector signed short y) |
| 181 |
{ |
| 182 |
return vec_cmpgt (x, y); |
| 183 |
} |
| 184 |
|
| 185 |
vector bool short |
| 186 |
cmpgt_us (vector unsigned short x, vector unsigned short y) |
| 187 |
{ |
| 188 |
return vec_cmpgt (x, y); |
| 189 |
} |
| 190 |
|
| 191 |
vector bool int |
| 192 |
cmpgt_si (vector signed int x, vector signed int y) |
| 193 |
{ |
| 194 |
return vec_cmpgt (x, y); |
| 195 |
} |
| 196 |
|
| 197 |
vector bool int |
| 198 |
cmplt_ui (vector unsigned int x, vector unsigned int y) |
| 199 |
{ |
| 200 |
return vec_cmplt (x, y); |
| 201 |
} |
| 202 |
|
| 203 |
vector bool int |
| 204 |
cmplt_f (vector float x, vector float y) |
| 205 |
{ |
| 206 |
return vec_cmplt (x, y); |
| 207 |
} |
| 208 |
|
| 209 |
vector bool long long int |
| 210 |
cmplt_d (vector double x, vector double y) |
| 211 |
{ |
| 212 |
return vec_cmplt (x, y); |
| 213 |
} |
| 214 |
|
| 215 |
vector bool long long |
| 216 |
cmplt_sl (vector signed long long x, vector signed long long y) |
| 217 |
{ |
| 218 |
return vec_cmplt (x, y); |
| 219 |
} |
| 220 |
|
| 221 |
vector bool long long |
| 222 |
cmplt_ul (vector unsigned long long x, vector unsigned long long y) |
| 223 |
{ |
| 224 |
return vec_cmplt (x, y); |
| 225 |
} |
| 226 |
|
| 227 |
vector bool char |
| 228 |
cmplt_sc (vector signed char x, vector signed char y) |
| 229 |
{ |
| 230 |
return vec_cmplt (x, y); |
| 231 |
} |
| 232 |
|
| 233 |
vector bool char |
| 234 |
cmplt_uc (vector unsigned char x, vector unsigned char y) |
| 235 |
{ |
| 236 |
return vec_cmplt (x, y); |
| 237 |
} |
| 238 |
|
| 239 |
vector bool short |
| 240 |
cmplt_ss (vector signed short x, vector signed short y) |
| 241 |
{ |
| 242 |
return vec_cmplt (x, y); |
| 243 |
} |
| 244 |
|
| 245 |
vector bool short |
| 246 |
cmplt_us (vector unsigned short x, vector unsigned short y) |
| 247 |
{ |
| 248 |
return vec_cmplt (x, y); |
| 249 |
} |
| 250 |
|
| 251 |
vector bool int |
| 252 |
cmplt_si (vector signed int x, vector signed int y) |
| 253 |
{ |
| 254 |
return vec_cmplt (x, y); |
| 255 |
} |