1 /* Copyright (C) 2014-2018 Free Software Foundation, Inc. 2 3 This file is part of GCC. 4 5 GCC is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 3, or (at your option) 8 any later version. 9 10 GCC is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 Under Section 7 of GPL version 3, you are granted additional 16 permissions described in the GCC Runtime Library Exception, version 17 3.1, as published by the Free Software Foundation. 18 19 You should have received a copy of the GNU General Public License and 20 a copy of the GCC Runtime Library Exception along with this program; 21 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 22 <http://www.gnu.org/licenses/>. */ 23 24 #ifndef _IMMINTRIN_H_INCLUDED 25 #error "Never use <avx512bwintrin.h> directly; include <immintrin.h> instead." 26 #endif 27 28 #ifndef _AVX512BWINTRIN_H_INCLUDED 29 #define _AVX512BWINTRIN_H_INCLUDED 30 31 #ifndef __AVX512BW__ 32 #pragma GCC push_options 33 #pragma GCC target("avx512bw") 34 #define __DISABLE_AVX512BW__ 35 #endif /* __AVX512BW__ */ 36 37 /* Internal data types for implementing the intrinsics. */ 38 typedef short __v32hi __attribute__ ((__vector_size__ (64))); 39 typedef char __v64qi __attribute__ ((__vector_size__ (64))); 40 41 typedef unsigned long long __mmask64; 42 43 extern __inline unsigned char 44 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 45 _ktest_mask32_u8 (__mmask32 __A, __mmask32 __B, unsigned char *__CF) 46 { 47 *__CF = (unsigned char) __builtin_ia32_ktestcsi (__A, __B); 48 return (unsigned char) __builtin_ia32_ktestzsi (__A, __B); 49 } 50 51 extern __inline unsigned char 52 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 53 _ktest_mask64_u8 (__mmask64 __A, __mmask64 __B, unsigned char *__CF) 54 { 55 *__CF = (unsigned char) __builtin_ia32_ktestcdi (__A, __B); 56 return (unsigned char) __builtin_ia32_ktestzdi (__A, __B); 57 } 58 59 extern __inline unsigned char 60 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 61 _ktestz_mask32_u8 (__mmask32 __A, __mmask32 __B) 62 { 63 return (unsigned char) __builtin_ia32_ktestzsi (__A, __B); 64 } 65 66 extern __inline unsigned char 67 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 68 _ktestz_mask64_u8 (__mmask64 __A, __mmask64 __B) 69 { 70 return (unsigned char) __builtin_ia32_ktestzdi (__A, __B); 71 } 72 73 extern __inline unsigned char 74 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 75 _ktestc_mask32_u8 (__mmask32 __A, __mmask32 __B) 76 { 77 return (unsigned char) __builtin_ia32_ktestcsi (__A, __B); 78 } 79 80 extern __inline unsigned char 81 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 82 _ktestc_mask64_u8 (__mmask64 __A, __mmask64 __B) 83 { 84 return (unsigned char) __builtin_ia32_ktestcdi (__A, __B); 85 } 86 87 extern __inline unsigned char 88 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 89 _kortest_mask32_u8 (__mmask32 __A, __mmask32 __B, unsigned char *__CF) 90 { 91 *__CF = (unsigned char) __builtin_ia32_kortestcsi (__A, __B); 92 return (unsigned char) __builtin_ia32_kortestzsi (__A, __B); 93 } 94 95 extern __inline unsigned char 96 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 97 _kortest_mask64_u8 (__mmask64 __A, __mmask64 __B, unsigned char *__CF) 98 { 99 *__CF = (unsigned char) __builtin_ia32_kortestcdi (__A, __B); 100 return (unsigned char) __builtin_ia32_kortestzdi (__A, __B); 101 } 102 103 extern __inline unsigned char 104 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 105 _kortestz_mask32_u8 (__mmask32 __A, __mmask32 __B) 106 { 107 return (unsigned char) __builtin_ia32_kortestzsi (__A, __B); 108 } 109 110 extern __inline unsigned char 111 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 112 _kortestz_mask64_u8 (__mmask64 __A, __mmask64 __B) 113 { 114 return (unsigned char) __builtin_ia32_kortestzdi (__A, __B); 115 } 116 117 extern __inline unsigned char 118 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 119 _kortestc_mask32_u8 (__mmask32 __A, __mmask32 __B) 120 { 121 return (unsigned char) __builtin_ia32_kortestcsi (__A, __B); 122 } 123 124 extern __inline unsigned char 125 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 126 _kortestc_mask64_u8 (__mmask64 __A, __mmask64 __B) 127 { 128 return (unsigned char) __builtin_ia32_kortestcdi (__A, __B); 129 } 130 131 extern __inline __mmask32 132 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 133 _kadd_mask32 (__mmask32 __A, __mmask32 __B) 134 { 135 return (__mmask32) __builtin_ia32_kaddsi ((__mmask32) __A, (__mmask32) __B); 136 } 137 138 extern __inline __mmask64 139 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 140 _kadd_mask64 (__mmask64 __A, __mmask64 __B) 141 { 142 return (__mmask64) __builtin_ia32_kadddi ((__mmask64) __A, (__mmask64) __B); 143 } 144 145 extern __inline unsigned int 146 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 147 _cvtmask32_u32 (__mmask32 __A) 148 { 149 return (unsigned int) __builtin_ia32_kmovd ((__mmask32) __A); 150 } 151 152 extern __inline unsigned long long 153 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 154 _cvtmask64_u64 (__mmask64 __A) 155 { 156 return (unsigned long long) __builtin_ia32_kmovq ((__mmask64) __A); 157 } 158 159 extern __inline __mmask32 160 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 161 _cvtu32_mask32 (unsigned int __A) 162 { 163 return (__mmask32) __builtin_ia32_kmovd ((__mmask32) __A); 164 } 165 166 extern __inline __mmask64 167 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 168 _cvtu64_mask64 (unsigned long long __A) 169 { 170 return (__mmask64) __builtin_ia32_kmovq ((__mmask64) __A); 171 } 172 173 extern __inline __mmask32 174 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 175 _load_mask32 (__mmask32 *__A) 176 { 177 return (__mmask32) __builtin_ia32_kmovd (*__A); 178 } 179 180 extern __inline __mmask64 181 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 182 _load_mask64 (__mmask64 *__A) 183 { 184 return (__mmask64) __builtin_ia32_kmovq (*(__mmask64 *) __A); 185 } 186 187 extern __inline void 188 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 189 _store_mask32 (__mmask32 *__A, __mmask32 __B) 190 { 191 *(__mmask32 *) __A = __builtin_ia32_kmovd (__B); 192 } 193 194 extern __inline void 195 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 196 _store_mask64 (__mmask64 *__A, __mmask64 __B) 197 { 198 *(__mmask64 *) __A = __builtin_ia32_kmovq (__B); 199 } 200 201 extern __inline __mmask32 202 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 203 _knot_mask32 (__mmask32 __A) 204 { 205 return (__mmask32) __builtin_ia32_knotsi ((__mmask32) __A); 206 } 207 208 extern __inline __mmask64 209 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 210 _knot_mask64 (__mmask64 __A) 211 { 212 return (__mmask64) __builtin_ia32_knotdi ((__mmask64) __A); 213 } 214 215 extern __inline __mmask32 216 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 217 _kor_mask32 (__mmask32 __A, __mmask32 __B) 218 { 219 return (__mmask32) __builtin_ia32_korsi ((__mmask32) __A, (__mmask32) __B); 220 } 221 222 extern __inline __mmask64 223 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 224 _kor_mask64 (__mmask64 __A, __mmask64 __B) 225 { 226 return (__mmask64) __builtin_ia32_kordi ((__mmask64) __A, (__mmask64) __B); 227 } 228 229 extern __inline __mmask32 230 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 231 _kxnor_mask32 (__mmask32 __A, __mmask32 __B) 232 { 233 return (__mmask32) __builtin_ia32_kxnorsi ((__mmask32) __A, (__mmask32) __B); 234 } 235 236 extern __inline __mmask64 237 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 238 _kxnor_mask64 (__mmask64 __A, __mmask64 __B) 239 { 240 return (__mmask64) __builtin_ia32_kxnordi ((__mmask64) __A, (__mmask64) __B); 241 } 242 243 extern __inline __mmask32 244 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 245 _kxor_mask32 (__mmask32 __A, __mmask32 __B) 246 { 247 return (__mmask32) __builtin_ia32_kxorsi ((__mmask32) __A, (__mmask32) __B); 248 } 249 250 extern __inline __mmask64 251 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 252 _kxor_mask64 (__mmask64 __A, __mmask64 __B) 253 { 254 return (__mmask64) __builtin_ia32_kxordi ((__mmask64) __A, (__mmask64) __B); 255 } 256 257 extern __inline __mmask32 258 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 259 _kand_mask32 (__mmask32 __A, __mmask32 __B) 260 { 261 return (__mmask32) __builtin_ia32_kandsi ((__mmask32) __A, (__mmask32) __B); 262 } 263 264 extern __inline __mmask64 265 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 266 _kand_mask64 (__mmask64 __A, __mmask64 __B) 267 { 268 return (__mmask64) __builtin_ia32_kanddi ((__mmask64) __A, (__mmask64) __B); 269 } 270 271 extern __inline __mmask32 272 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 273 _kandn_mask32 (__mmask32 __A, __mmask32 __B) 274 { 275 return (__mmask32) __builtin_ia32_kandnsi ((__mmask32) __A, (__mmask32) __B); 276 } 277 278 extern __inline __mmask64 279 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 280 _kandn_mask64 (__mmask64 __A, __mmask64 __B) 281 { 282 return (__mmask64) __builtin_ia32_kandndi ((__mmask64) __A, (__mmask64) __B); 283 } 284 285 extern __inline __m512i 286 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 287 _mm512_mask_mov_epi16 (__m512i __W, __mmask32 __U, __m512i __A) 288 { 289 return (__m512i) __builtin_ia32_movdquhi512_mask ((__v32hi) __A, 290 (__v32hi) __W, 291 (__mmask32) __U); 292 } 293 294 extern __inline __m512i 295 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 296 _mm512_maskz_mov_epi16 (__mmask32 __U, __m512i __A) 297 { 298 return (__m512i) __builtin_ia32_movdquhi512_mask ((__v32hi) __A, 299 (__v32hi) 300 _mm512_setzero_si512 (), 301 (__mmask32) __U); 302 } 303 304 extern __inline __m512i 305 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 306 _mm512_mask_loadu_epi16 (__m512i __W, __mmask32 __U, void const *__P) 307 { 308 return (__m512i) __builtin_ia32_loaddquhi512_mask ((const short *) __P, 309 (__v32hi) __W, 310 (__mmask32) __U); 311 } 312 313 extern __inline __m512i 314 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 315 _mm512_maskz_loadu_epi16 (__mmask32 __U, void const *__P) 316 { 317 return (__m512i) __builtin_ia32_loaddquhi512_mask ((const short *) __P, 318 (__v32hi) 319 _mm512_setzero_si512 (), 320 (__mmask32) __U); 321 } 322 323 extern __inline void 324 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 325 _mm512_mask_storeu_epi16 (void *__P, __mmask32 __U, __m512i __A) 326 { 327 __builtin_ia32_storedquhi512_mask ((short *) __P, 328 (__v32hi) __A, 329 (__mmask32) __U); 330 } 331 332 extern __inline __m512i 333 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 334 _mm512_mask_mov_epi8 (__m512i __W, __mmask64 __U, __m512i __A) 335 { 336 return (__m512i) __builtin_ia32_movdquqi512_mask ((__v64qi) __A, 337 (__v64qi) __W, 338 (__mmask64) __U); 339 } 340 341 extern __inline __m512i 342 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 343 _mm512_maskz_mov_epi8 (__mmask64 __U, __m512i __A) 344 { 345 return (__m512i) __builtin_ia32_movdquqi512_mask ((__v64qi) __A, 346 (__v64qi) 347 _mm512_setzero_si512 (), 348 (__mmask64) __U); 349 } 350 351 extern __inline __mmask32 352 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 353 _mm512_kunpackw (__mmask32 __A, __mmask32 __B) 354 { 355 return (__mmask32) __builtin_ia32_kunpcksi ((__mmask32) __A, 356 (__mmask32) __B); 357 } 358 359 extern __inline __mmask32 360 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 361 _kunpackw_mask32 (__mmask16 __A, __mmask16 __B) 362 { 363 return (__mmask32) __builtin_ia32_kunpcksi ((__mmask32) __A, 364 (__mmask32) __B); 365 } 366 367 extern __inline __mmask64 368 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 369 _mm512_kunpackd (__mmask64 __A, __mmask64 __B) 370 { 371 return (__mmask64) __builtin_ia32_kunpckdi ((__mmask64) __A, 372 (__mmask64) __B); 373 } 374 375 extern __inline __mmask64 376 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 377 _kunpackd_mask64 (__mmask32 __A, __mmask32 __B) 378 { 379 return (__mmask64) __builtin_ia32_kunpckdi ((__mmask64) __A, 380 (__mmask64) __B); 381 } 382 383 extern __inline __m512i 384 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 385 _mm512_mask_loadu_epi8 (__m512i __W, __mmask64 __U, void const *__P) 386 { 387 return (__m512i) __builtin_ia32_loaddquqi512_mask ((const char *) __P, 388 (__v64qi) __W, 389 (__mmask64) __U); 390 } 391 392 extern __inline __m512i 393 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 394 _mm512_maskz_loadu_epi8 (__mmask64 __U, void const *__P) 395 { 396 return (__m512i) __builtin_ia32_loaddquqi512_mask ((const char *) __P, 397 (__v64qi) 398 _mm512_setzero_si512 (), 399 (__mmask64) __U); 400 } 401 402 extern __inline void 403 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 404 _mm512_mask_storeu_epi8 (void *__P, __mmask64 __U, __m512i __A) 405 { 406 __builtin_ia32_storedquqi512_mask ((char *) __P, 407 (__v64qi) __A, 408 (__mmask64) __U); 409 } 410 411 extern __inline __m512i 412 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 413 _mm512_sad_epu8 (__m512i __A, __m512i __B) 414 { 415 return (__m512i) __builtin_ia32_psadbw512 ((__v64qi) __A, 416 (__v64qi) __B); 417 } 418 419 extern __inline __m256i 420 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 421 _mm512_cvtepi16_epi8 (__m512i __A) 422 { 423 return (__m256i) __builtin_ia32_pmovwb512_mask ((__v32hi) __A, 424 (__v32qi) _mm256_undefined_si256(), 425 (__mmask32) -1); 426 } 427 428 extern __inline void 429 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 430 _mm512_mask_cvtepi16_storeu_epi8 (void * __P, __mmask32 __M, __m512i __A) 431 { 432 __builtin_ia32_pmovwb512mem_mask ((__v32qi *) __P, (__v32hi) __A, __M); 433 } 434 435 extern __inline __m256i 436 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 437 _mm512_mask_cvtepi16_epi8 (__m256i __O, __mmask32 __M, __m512i __A) 438 { 439 return (__m256i) __builtin_ia32_pmovwb512_mask ((__v32hi) __A, 440 (__v32qi) __O, __M); 441 } 442 443 extern __inline __m256i 444 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 445 _mm512_maskz_cvtepi16_epi8 (__mmask32 __M, __m512i __A) 446 { 447 return (__m256i) __builtin_ia32_pmovwb512_mask ((__v32hi) __A, 448 (__v32qi) 449 _mm256_setzero_si256 (), 450 __M); 451 } 452 453 extern __inline __m256i 454 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 455 _mm512_cvtsepi16_epi8 (__m512i __A) 456 { 457 return (__m256i) __builtin_ia32_pmovswb512_mask ((__v32hi) __A, 458 (__v32qi)_mm256_undefined_si256(), 459 (__mmask32) -1); 460 } 461 462 extern __inline void 463 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 464 _mm512_mask_cvtsepi16_storeu_epi8 (void * __P, __mmask32 __M, __m512i __A) 465 { 466 __builtin_ia32_pmovswb512mem_mask ((__v32qi *) __P, (__v32hi) __A, __M); 467 } 468 469 extern __inline __m256i 470 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 471 _mm512_mask_cvtsepi16_epi8 (__m256i __O, __mmask32 __M, __m512i __A) 472 { 473 return (__m256i) __builtin_ia32_pmovswb512_mask ((__v32hi) __A, 474 (__v32qi)__O, 475 __M); 476 } 477 478 extern __inline __m256i 479 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 480 _mm512_maskz_cvtsepi16_epi8 (__mmask32 __M, __m512i __A) 481 { 482 return (__m256i) __builtin_ia32_pmovswb512_mask ((__v32hi) __A, 483 (__v32qi) 484 _mm256_setzero_si256 (), 485 __M); 486 } 487 488 extern __inline __m256i 489 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 490 _mm512_cvtusepi16_epi8 (__m512i __A) 491 { 492 return (__m256i) __builtin_ia32_pmovuswb512_mask ((__v32hi) __A, 493 (__v32qi)_mm256_undefined_si256(), 494 (__mmask32) -1); 495 } 496 497 extern __inline __m256i 498 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 499 _mm512_mask_cvtusepi16_epi8 (__m256i __O, __mmask32 __M, __m512i __A) 500 { 501 return (__m256i) __builtin_ia32_pmovuswb512_mask ((__v32hi) __A, 502 (__v32qi) __O, 503 __M); 504 } 505 506 extern __inline void 507 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 508 _mm512_mask_cvtusepi16_storeu_epi8 (void * __P, __mmask32 __M, __m512i __A) 509 { 510 __builtin_ia32_pmovuswb512mem_mask ((__v32qi *) __P, (__v32hi) __A, __M); 511 } 512 513 extern __inline __m256i 514 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 515 _mm512_maskz_cvtusepi16_epi8 (__mmask32 __M, __m512i __A) 516 { 517 return (__m256i) __builtin_ia32_pmovuswb512_mask ((__v32hi) __A, 518 (__v32qi) 519 _mm256_setzero_si256 (), 520 __M); 521 } 522 523 extern __inline __m512i 524 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 525 _mm512_broadcastb_epi8 (__m128i __A) 526 { 527 return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A, 528 (__v64qi)_mm512_undefined_epi32(), 529 (__mmask64) -1); 530 } 531 532 extern __inline __m512i 533 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 534 _mm512_mask_broadcastb_epi8 (__m512i __O, __mmask64 __M, __m128i __A) 535 { 536 return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A, 537 (__v64qi) __O, 538 __M); 539 } 540 541 extern __inline __m512i 542 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 543 _mm512_maskz_broadcastb_epi8 (__mmask64 __M, __m128i __A) 544 { 545 return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A, 546 (__v64qi) 547 _mm512_setzero_si512 (), 548 __M); 549 } 550 551 extern __inline __m512i 552 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 553 _mm512_mask_set1_epi8 (__m512i __O, __mmask64 __M, char __A) 554 { 555 return (__m512i) __builtin_ia32_pbroadcastb512_gpr_mask (__A, 556 (__v64qi) __O, 557 __M); 558 } 559 560 extern __inline __m512i 561 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 562 _mm512_maskz_set1_epi8 (__mmask64 __M, char __A) 563 { 564 return (__m512i) 565 __builtin_ia32_pbroadcastb512_gpr_mask (__A, 566 (__v64qi) 567 _mm512_setzero_si512 (), 568 __M); 569 } 570 571 extern __inline __m512i 572 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 573 _mm512_broadcastw_epi16 (__m128i __A) 574 { 575 return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A, 576 (__v32hi)_mm512_undefined_epi32(), 577 (__mmask32) -1); 578 } 579 580 extern __inline __m512i 581 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 582 _mm512_mask_broadcastw_epi16 (__m512i __O, __mmask32 __M, __m128i __A) 583 { 584 return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A, 585 (__v32hi) __O, 586 __M); 587 } 588 589 extern __inline __m512i 590 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 591 _mm512_maskz_broadcastw_epi16 (__mmask32 __M, __m128i __A) 592 { 593 return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A, 594 (__v32hi) 595 _mm512_setzero_si512 (), 596 __M); 597 } 598 599 extern __inline __m512i 600 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 601 _mm512_mask_set1_epi16 (__m512i __O, __mmask32 __M, short __A) 602 { 603 return (__m512i) __builtin_ia32_pbroadcastw512_gpr_mask (__A, 604 (__v32hi) __O, 605 __M); 606 } 607 608 extern __inline __m512i 609 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 610 _mm512_maskz_set1_epi16 (__mmask32 __M, short __A) 611 { 612 return (__m512i) 613 __builtin_ia32_pbroadcastw512_gpr_mask (__A, 614 (__v32hi) 615 _mm512_setzero_si512 (), 616 __M); 617 } 618 619 extern __inline __m512i 620 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 621 _mm512_mulhrs_epi16 (__m512i __A, __m512i __B) 622 { 623 return (__m512i) __builtin_ia32_pmulhrsw512_mask ((__v32hi) __A, 624 (__v32hi) __B, 625 (__v32hi) 626 _mm512_setzero_si512 (), 627 (__mmask32) -1); 628 } 629 630 extern __inline __m512i 631 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 632 _mm512_mask_mulhrs_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 633 __m512i __B) 634 { 635 return (__m512i) __builtin_ia32_pmulhrsw512_mask ((__v32hi) __A, 636 (__v32hi) __B, 637 (__v32hi) __W, 638 (__mmask32) __U); 639 } 640 641 extern __inline __m512i 642 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 643 _mm512_maskz_mulhrs_epi16 (__mmask32 __U, __m512i __A, __m512i __B) 644 { 645 return (__m512i) __builtin_ia32_pmulhrsw512_mask ((__v32hi) __A, 646 (__v32hi) __B, 647 (__v32hi) 648 _mm512_setzero_si512 (), 649 (__mmask32) __U); 650 } 651 652 extern __inline __m512i 653 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 654 _mm512_mulhi_epi16 (__m512i __A, __m512i __B) 655 { 656 return (__m512i) __builtin_ia32_pmulhw512_mask ((__v32hi) __A, 657 (__v32hi) __B, 658 (__v32hi) 659 _mm512_setzero_si512 (), 660 (__mmask32) -1); 661 } 662 663 extern __inline __m512i 664 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 665 _mm512_mask_mulhi_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 666 __m512i __B) 667 { 668 return (__m512i) __builtin_ia32_pmulhw512_mask ((__v32hi) __A, 669 (__v32hi) __B, 670 (__v32hi) __W, 671 (__mmask32) __U); 672 } 673 674 extern __inline __m512i 675 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 676 _mm512_maskz_mulhi_epi16 (__mmask32 __U, __m512i __A, __m512i __B) 677 { 678 return (__m512i) __builtin_ia32_pmulhw512_mask ((__v32hi) __A, 679 (__v32hi) __B, 680 (__v32hi) 681 _mm512_setzero_si512 (), 682 (__mmask32) __U); 683 } 684 685 extern __inline __m512i 686 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 687 _mm512_mulhi_epu16 (__m512i __A, __m512i __B) 688 { 689 return (__m512i) __builtin_ia32_pmulhuw512_mask ((__v32hi) __A, 690 (__v32hi) __B, 691 (__v32hi) 692 _mm512_setzero_si512 (), 693 (__mmask32) -1); 694 } 695 696 extern __inline __m512i 697 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 698 _mm512_mask_mulhi_epu16 (__m512i __W, __mmask32 __U, __m512i __A, 699 __m512i __B) 700 { 701 return (__m512i) __builtin_ia32_pmulhuw512_mask ((__v32hi) __A, 702 (__v32hi) __B, 703 (__v32hi) __W, 704 (__mmask32) __U); 705 } 706 707 extern __inline __m512i 708 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 709 _mm512_maskz_mulhi_epu16 (__mmask32 __U, __m512i __A, __m512i __B) 710 { 711 return (__m512i) __builtin_ia32_pmulhuw512_mask ((__v32hi) __A, 712 (__v32hi) __B, 713 (__v32hi) 714 _mm512_setzero_si512 (), 715 (__mmask32) __U); 716 } 717 718 extern __inline __m512i 719 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 720 _mm512_mullo_epi16 (__m512i __A, __m512i __B) 721 { 722 return (__m512i) ((__v32hu) __A * (__v32hu) __B); 723 } 724 725 extern __inline __m512i 726 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 727 _mm512_mask_mullo_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 728 __m512i __B) 729 { 730 return (__m512i) __builtin_ia32_pmullw512_mask ((__v32hi) __A, 731 (__v32hi) __B, 732 (__v32hi) __W, 733 (__mmask32) __U); 734 } 735 736 extern __inline __m512i 737 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 738 _mm512_maskz_mullo_epi16 (__mmask32 __U, __m512i __A, __m512i __B) 739 { 740 return (__m512i) __builtin_ia32_pmullw512_mask ((__v32hi) __A, 741 (__v32hi) __B, 742 (__v32hi) 743 _mm512_setzero_si512 (), 744 (__mmask32) __U); 745 } 746 747 extern __inline __m512i 748 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 749 _mm512_cvtepi8_epi16 (__m256i __A) 750 { 751 return (__m512i) __builtin_ia32_pmovsxbw512_mask ((__v32qi) __A, 752 (__v32hi) 753 _mm512_setzero_si512 (), 754 (__mmask32) -1); 755 } 756 757 extern __inline __m512i 758 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 759 _mm512_mask_cvtepi8_epi16 (__m512i __W, __mmask32 __U, __m256i __A) 760 { 761 return (__m512i) __builtin_ia32_pmovsxbw512_mask ((__v32qi) __A, 762 (__v32hi) __W, 763 (__mmask32) __U); 764 } 765 766 extern __inline __m512i 767 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 768 _mm512_maskz_cvtepi8_epi16 (__mmask32 __U, __m256i __A) 769 { 770 return (__m512i) __builtin_ia32_pmovsxbw512_mask ((__v32qi) __A, 771 (__v32hi) 772 _mm512_setzero_si512 (), 773 (__mmask32) __U); 774 } 775 776 extern __inline __m512i 777 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 778 _mm512_cvtepu8_epi16 (__m256i __A) 779 { 780 return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A, 781 (__v32hi) 782 _mm512_setzero_si512 (), 783 (__mmask32) -1); 784 } 785 786 extern __inline __m512i 787 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 788 _mm512_mask_cvtepu8_epi16 (__m512i __W, __mmask32 __U, __m256i __A) 789 { 790 return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A, 791 (__v32hi) __W, 792 (__mmask32) __U); 793 } 794 795 extern __inline __m512i 796 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 797 _mm512_maskz_cvtepu8_epi16 (__mmask32 __U, __m256i __A) 798 { 799 return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A, 800 (__v32hi) 801 _mm512_setzero_si512 (), 802 (__mmask32) __U); 803 } 804 805 extern __inline __m512i 806 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 807 _mm512_permutexvar_epi16 (__m512i __A, __m512i __B) 808 { 809 return (__m512i) __builtin_ia32_permvarhi512_mask ((__v32hi) __B, 810 (__v32hi) __A, 811 (__v32hi) 812 _mm512_setzero_si512 (), 813 (__mmask32) -1); 814 } 815 816 extern __inline __m512i 817 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 818 _mm512_maskz_permutexvar_epi16 (__mmask32 __M, __m512i __A, 819 __m512i __B) 820 { 821 return (__m512i) __builtin_ia32_permvarhi512_mask ((__v32hi) __B, 822 (__v32hi) __A, 823 (__v32hi) 824 _mm512_setzero_si512 (), 825 (__mmask32) __M); 826 } 827 828 extern __inline __m512i 829 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 830 _mm512_mask_permutexvar_epi16 (__m512i __W, __mmask32 __M, __m512i __A, 831 __m512i __B) 832 { 833 return (__m512i) __builtin_ia32_permvarhi512_mask ((__v32hi) __B, 834 (__v32hi) __A, 835 (__v32hi) __W, 836 (__mmask32) __M); 837 } 838 839 extern __inline __m512i 840 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 841 _mm512_permutex2var_epi16 (__m512i __A, __m512i __I, __m512i __B) 842 { 843 return (__m512i) __builtin_ia32_vpermt2varhi512_mask ((__v32hi) __I 844 /* idx */ , 845 (__v32hi) __A, 846 (__v32hi) __B, 847 (__mmask32) -1); 848 } 849 850 extern __inline __m512i 851 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 852 _mm512_mask_permutex2var_epi16 (__m512i __A, __mmask32 __U, 853 __m512i __I, __m512i __B) 854 { 855 return (__m512i) __builtin_ia32_vpermt2varhi512_mask ((__v32hi) __I 856 /* idx */ , 857 (__v32hi) __A, 858 (__v32hi) __B, 859 (__mmask32) 860 __U); 861 } 862 863 extern __inline __m512i 864 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 865 _mm512_mask2_permutex2var_epi16 (__m512i __A, __m512i __I, 866 __mmask32 __U, __m512i __B) 867 { 868 return (__m512i) __builtin_ia32_vpermi2varhi512_mask ((__v32hi) __A, 869 (__v32hi) __I 870 /* idx */ , 871 (__v32hi) __B, 872 (__mmask32) 873 __U); 874 } 875 876 extern __inline __m512i 877 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 878 _mm512_maskz_permutex2var_epi16 (__mmask32 __U, __m512i __A, 879 __m512i __I, __m512i __B) 880 { 881 return (__m512i) __builtin_ia32_vpermt2varhi512_maskz ((__v32hi) __I 882 /* idx */ , 883 (__v32hi) __A, 884 (__v32hi) __B, 885 (__mmask32) 886 __U); 887 } 888 889 extern __inline __m512i 890 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 891 _mm512_avg_epu8 (__m512i __A, __m512i __B) 892 { 893 return (__m512i) __builtin_ia32_pavgb512_mask ((__v64qi) __A, 894 (__v64qi) __B, 895 (__v64qi) 896 _mm512_setzero_si512 (), 897 (__mmask64) -1); 898 } 899 900 extern __inline __m512i 901 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 902 _mm512_mask_avg_epu8 (__m512i __W, __mmask64 __U, __m512i __A, 903 __m512i __B) 904 { 905 return (__m512i) __builtin_ia32_pavgb512_mask ((__v64qi) __A, 906 (__v64qi) __B, 907 (__v64qi) __W, 908 (__mmask64) __U); 909 } 910 911 extern __inline __m512i 912 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 913 _mm512_maskz_avg_epu8 (__mmask64 __U, __m512i __A, __m512i __B) 914 { 915 return (__m512i) __builtin_ia32_pavgb512_mask ((__v64qi) __A, 916 (__v64qi) __B, 917 (__v64qi) 918 _mm512_setzero_si512 (), 919 (__mmask64) __U); 920 } 921 922 extern __inline __m512i 923 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 924 _mm512_add_epi8 (__m512i __A, __m512i __B) 925 { 926 return (__m512i) ((__v64qu) __A + (__v64qu) __B); 927 } 928 929 extern __inline __m512i 930 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 931 _mm512_mask_add_epi8 (__m512i __W, __mmask64 __U, __m512i __A, 932 __m512i __B) 933 { 934 return (__m512i) __builtin_ia32_paddb512_mask ((__v64qi) __A, 935 (__v64qi) __B, 936 (__v64qi) __W, 937 (__mmask64) __U); 938 } 939 940 extern __inline __m512i 941 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 942 _mm512_maskz_add_epi8 (__mmask64 __U, __m512i __A, __m512i __B) 943 { 944 return (__m512i) __builtin_ia32_paddb512_mask ((__v64qi) __A, 945 (__v64qi) __B, 946 (__v64qi) 947 _mm512_setzero_si512 (), 948 (__mmask64) __U); 949 } 950 951 extern __inline __m512i 952 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 953 _mm512_sub_epi8 (__m512i __A, __m512i __B) 954 { 955 return (__m512i) ((__v64qu) __A - (__v64qu) __B); 956 } 957 958 extern __inline __m512i 959 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 960 _mm512_mask_sub_epi8 (__m512i __W, __mmask64 __U, __m512i __A, 961 __m512i __B) 962 { 963 return (__m512i) __builtin_ia32_psubb512_mask ((__v64qi) __A, 964 (__v64qi) __B, 965 (__v64qi) __W, 966 (__mmask64) __U); 967 } 968 969 extern __inline __m512i 970 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 971 _mm512_maskz_sub_epi8 (__mmask64 __U, __m512i __A, __m512i __B) 972 { 973 return (__m512i) __builtin_ia32_psubb512_mask ((__v64qi) __A, 974 (__v64qi) __B, 975 (__v64qi) 976 _mm512_setzero_si512 (), 977 (__mmask64) __U); 978 } 979 980 extern __inline __m512i 981 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 982 _mm512_avg_epu16 (__m512i __A, __m512i __B) 983 { 984 return (__m512i) __builtin_ia32_pavgw512_mask ((__v32hi) __A, 985 (__v32hi) __B, 986 (__v32hi) 987 _mm512_setzero_si512 (), 988 (__mmask32) -1); 989 } 990 991 extern __inline __m512i 992 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 993 _mm512_mask_avg_epu16 (__m512i __W, __mmask32 __U, __m512i __A, 994 __m512i __B) 995 { 996 return (__m512i) __builtin_ia32_pavgw512_mask ((__v32hi) __A, 997 (__v32hi) __B, 998 (__v32hi) __W, 999 (__mmask32) __U); 1000 } 1001 1002 extern __inline __m512i 1003 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1004 _mm512_maskz_avg_epu16 (__mmask32 __U, __m512i __A, __m512i __B) 1005 { 1006 return (__m512i) __builtin_ia32_pavgw512_mask ((__v32hi) __A, 1007 (__v32hi) __B, 1008 (__v32hi) 1009 _mm512_setzero_si512 (), 1010 (__mmask32) __U); 1011 } 1012 1013 extern __inline __m512i 1014 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1015 _mm512_subs_epi8 (__m512i __A, __m512i __B) 1016 { 1017 return (__m512i) __builtin_ia32_psubsb512_mask ((__v64qi) __A, 1018 (__v64qi) __B, 1019 (__v64qi) 1020 _mm512_setzero_si512 (), 1021 (__mmask64) -1); 1022 } 1023 1024 extern __inline __m512i 1025 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1026 _mm512_mask_subs_epi8 (__m512i __W, __mmask64 __U, __m512i __A, 1027 __m512i __B) 1028 { 1029 return (__m512i) __builtin_ia32_psubsb512_mask ((__v64qi) __A, 1030 (__v64qi) __B, 1031 (__v64qi) __W, 1032 (__mmask64) __U); 1033 } 1034 1035 extern __inline __m512i 1036 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1037 _mm512_maskz_subs_epi8 (__mmask64 __U, __m512i __A, __m512i __B) 1038 { 1039 return (__m512i) __builtin_ia32_psubsb512_mask ((__v64qi) __A, 1040 (__v64qi) __B, 1041 (__v64qi) 1042 _mm512_setzero_si512 (), 1043 (__mmask64) __U); 1044 } 1045 1046 extern __inline __m512i 1047 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1048 _mm512_subs_epu8 (__m512i __A, __m512i __B) 1049 { 1050 return (__m512i) __builtin_ia32_psubusb512_mask ((__v64qi) __A, 1051 (__v64qi) __B, 1052 (__v64qi) 1053 _mm512_setzero_si512 (), 1054 (__mmask64) -1); 1055 } 1056 1057 extern __inline __m512i 1058 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1059 _mm512_mask_subs_epu8 (__m512i __W, __mmask64 __U, __m512i __A, 1060 __m512i __B) 1061 { 1062 return (__m512i) __builtin_ia32_psubusb512_mask ((__v64qi) __A, 1063 (__v64qi) __B, 1064 (__v64qi) __W, 1065 (__mmask64) __U); 1066 } 1067 1068 extern __inline __m512i 1069 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1070 _mm512_maskz_subs_epu8 (__mmask64 __U, __m512i __A, __m512i __B) 1071 { 1072 return (__m512i) __builtin_ia32_psubusb512_mask ((__v64qi) __A, 1073 (__v64qi) __B, 1074 (__v64qi) 1075 _mm512_setzero_si512 (), 1076 (__mmask64) __U); 1077 } 1078 1079 extern __inline __m512i 1080 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1081 _mm512_adds_epi8 (__m512i __A, __m512i __B) 1082 { 1083 return (__m512i) __builtin_ia32_paddsb512_mask ((__v64qi) __A, 1084 (__v64qi) __B, 1085 (__v64qi) 1086 _mm512_setzero_si512 (), 1087 (__mmask64) -1); 1088 } 1089 1090 extern __inline __m512i 1091 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1092 _mm512_mask_adds_epi8 (__m512i __W, __mmask64 __U, __m512i __A, 1093 __m512i __B) 1094 { 1095 return (__m512i) __builtin_ia32_paddsb512_mask ((__v64qi) __A, 1096 (__v64qi) __B, 1097 (__v64qi) __W, 1098 (__mmask64) __U); 1099 } 1100 1101 extern __inline __m512i 1102 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1103 _mm512_maskz_adds_epi8 (__mmask64 __U, __m512i __A, __m512i __B) 1104 { 1105 return (__m512i) __builtin_ia32_paddsb512_mask ((__v64qi) __A, 1106 (__v64qi) __B, 1107 (__v64qi) 1108 _mm512_setzero_si512 (), 1109 (__mmask64) __U); 1110 } 1111 1112 extern __inline __m512i 1113 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1114 _mm512_adds_epu8 (__m512i __A, __m512i __B) 1115 { 1116 return (__m512i) __builtin_ia32_paddusb512_mask ((__v64qi) __A, 1117 (__v64qi) __B, 1118 (__v64qi) 1119 _mm512_setzero_si512 (), 1120 (__mmask64) -1); 1121 } 1122 1123 extern __inline __m512i 1124 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1125 _mm512_mask_adds_epu8 (__m512i __W, __mmask64 __U, __m512i __A, 1126 __m512i __B) 1127 { 1128 return (__m512i) __builtin_ia32_paddusb512_mask ((__v64qi) __A, 1129 (__v64qi) __B, 1130 (__v64qi) __W, 1131 (__mmask64) __U); 1132 } 1133 1134 extern __inline __m512i 1135 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1136 _mm512_maskz_adds_epu8 (__mmask64 __U, __m512i __A, __m512i __B) 1137 { 1138 return (__m512i) __builtin_ia32_paddusb512_mask ((__v64qi) __A, 1139 (__v64qi) __B, 1140 (__v64qi) 1141 _mm512_setzero_si512 (), 1142 (__mmask64) __U); 1143 } 1144 1145 extern __inline __m512i 1146 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1147 _mm512_sub_epi16 (__m512i __A, __m512i __B) 1148 { 1149 return (__m512i) ((__v32hu) __A - (__v32hu) __B); 1150 } 1151 1152 extern __inline __m512i 1153 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1154 _mm512_mask_sub_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 1155 __m512i __B) 1156 { 1157 return (__m512i) __builtin_ia32_psubw512_mask ((__v32hi) __A, 1158 (__v32hi) __B, 1159 (__v32hi) __W, 1160 (__mmask32) __U); 1161 } 1162 1163 extern __inline __m512i 1164 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1165 _mm512_maskz_sub_epi16 (__mmask32 __U, __m512i __A, __m512i __B) 1166 { 1167 return (__m512i) __builtin_ia32_psubw512_mask ((__v32hi) __A, 1168 (__v32hi) __B, 1169 (__v32hi) 1170 _mm512_setzero_si512 (), 1171 (__mmask32) __U); 1172 } 1173 1174 extern __inline __m512i 1175 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1176 _mm512_subs_epi16 (__m512i __A, __m512i __B) 1177 { 1178 return (__m512i) __builtin_ia32_psubsw512_mask ((__v32hi) __A, 1179 (__v32hi) __B, 1180 (__v32hi) 1181 _mm512_setzero_si512 (), 1182 (__mmask32) -1); 1183 } 1184 1185 extern __inline __m512i 1186 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1187 _mm512_mask_subs_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 1188 __m512i __B) 1189 { 1190 return (__m512i) __builtin_ia32_psubsw512_mask ((__v32hi) __A, 1191 (__v32hi) __B, 1192 (__v32hi) __W, 1193 (__mmask32) __U); 1194 } 1195 1196 extern __inline __m512i 1197 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1198 _mm512_maskz_subs_epi16 (__mmask32 __U, __m512i __A, __m512i __B) 1199 { 1200 return (__m512i) __builtin_ia32_psubsw512_mask ((__v32hi) __A, 1201 (__v32hi) __B, 1202 (__v32hi) 1203 _mm512_setzero_si512 (), 1204 (__mmask32) __U); 1205 } 1206 1207 extern __inline __m512i 1208 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1209 _mm512_subs_epu16 (__m512i __A, __m512i __B) 1210 { 1211 return (__m512i) __builtin_ia32_psubusw512_mask ((__v32hi) __A, 1212 (__v32hi) __B, 1213 (__v32hi) 1214 _mm512_setzero_si512 (), 1215 (__mmask32) -1); 1216 } 1217 1218 extern __inline __m512i 1219 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1220 _mm512_mask_subs_epu16 (__m512i __W, __mmask32 __U, __m512i __A, 1221 __m512i __B) 1222 { 1223 return (__m512i) __builtin_ia32_psubusw512_mask ((__v32hi) __A, 1224 (__v32hi) __B, 1225 (__v32hi) __W, 1226 (__mmask32) __U); 1227 } 1228 1229 extern __inline __m512i 1230 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1231 _mm512_maskz_subs_epu16 (__mmask32 __U, __m512i __A, __m512i __B) 1232 { 1233 return (__m512i) __builtin_ia32_psubusw512_mask ((__v32hi) __A, 1234 (__v32hi) __B, 1235 (__v32hi) 1236 _mm512_setzero_si512 (), 1237 (__mmask32) __U); 1238 } 1239 1240 extern __inline __m512i 1241 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1242 _mm512_add_epi16 (__m512i __A, __m512i __B) 1243 { 1244 return (__m512i) ((__v32hu) __A + (__v32hu) __B); 1245 } 1246 1247 extern __inline __m512i 1248 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1249 _mm512_mask_add_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 1250 __m512i __B) 1251 { 1252 return (__m512i) __builtin_ia32_paddw512_mask ((__v32hi) __A, 1253 (__v32hi) __B, 1254 (__v32hi) __W, 1255 (__mmask32) __U); 1256 } 1257 1258 extern __inline __m512i 1259 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1260 _mm512_maskz_add_epi16 (__mmask32 __U, __m512i __A, __m512i __B) 1261 { 1262 return (__m512i) __builtin_ia32_paddw512_mask ((__v32hi) __A, 1263 (__v32hi) __B, 1264 (__v32hi) 1265 _mm512_setzero_si512 (), 1266 (__mmask32) __U); 1267 } 1268 1269 extern __inline __m512i 1270 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1271 _mm512_adds_epi16 (__m512i __A, __m512i __B) 1272 { 1273 return (__m512i) __builtin_ia32_paddsw512_mask ((__v32hi) __A, 1274 (__v32hi) __B, 1275 (__v32hi) 1276 _mm512_setzero_si512 (), 1277 (__mmask32) -1); 1278 } 1279 1280 extern __inline __m512i 1281 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1282 _mm512_mask_adds_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 1283 __m512i __B) 1284 { 1285 return (__m512i) __builtin_ia32_paddsw512_mask ((__v32hi) __A, 1286 (__v32hi) __B, 1287 (__v32hi) __W, 1288 (__mmask32) __U); 1289 } 1290 1291 extern __inline __m512i 1292 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1293 _mm512_maskz_adds_epi16 (__mmask32 __U, __m512i __A, __m512i __B) 1294 { 1295 return (__m512i) __builtin_ia32_paddsw512_mask ((__v32hi) __A, 1296 (__v32hi) __B, 1297 (__v32hi) 1298 _mm512_setzero_si512 (), 1299 (__mmask32) __U); 1300 } 1301 1302 extern __inline __m512i 1303 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1304 _mm512_adds_epu16 (__m512i __A, __m512i __B) 1305 { 1306 return (__m512i) __builtin_ia32_paddusw512_mask ((__v32hi) __A, 1307 (__v32hi) __B, 1308 (__v32hi) 1309 _mm512_setzero_si512 (), 1310 (__mmask32) -1); 1311 } 1312 1313 extern __inline __m512i 1314 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1315 _mm512_mask_adds_epu16 (__m512i __W, __mmask32 __U, __m512i __A, 1316 __m512i __B) 1317 { 1318 return (__m512i) __builtin_ia32_paddusw512_mask ((__v32hi) __A, 1319 (__v32hi) __B, 1320 (__v32hi) __W, 1321 (__mmask32) __U); 1322 } 1323 1324 extern __inline __m512i 1325 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1326 _mm512_maskz_adds_epu16 (__mmask32 __U, __m512i __A, __m512i __B) 1327 { 1328 return (__m512i) __builtin_ia32_paddusw512_mask ((__v32hi) __A, 1329 (__v32hi) __B, 1330 (__v32hi) 1331 _mm512_setzero_si512 (), 1332 (__mmask32) __U); 1333 } 1334 1335 extern __inline __m512i 1336 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1337 _mm512_srl_epi16 (__m512i __A, __m128i __B) 1338 { 1339 return (__m512i) __builtin_ia32_psrlw512_mask ((__v32hi) __A, 1340 (__v8hi) __B, 1341 (__v32hi) 1342 _mm512_setzero_si512 (), 1343 (__mmask32) -1); 1344 } 1345 1346 extern __inline __m512i 1347 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1348 _mm512_mask_srl_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 1349 __m128i __B) 1350 { 1351 return (__m512i) __builtin_ia32_psrlw512_mask ((__v32hi) __A, 1352 (__v8hi) __B, 1353 (__v32hi) __W, 1354 (__mmask32) __U); 1355 } 1356 1357 extern __inline __m512i 1358 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1359 _mm512_maskz_srl_epi16 (__mmask32 __U, __m512i __A, __m128i __B) 1360 { 1361 return (__m512i) __builtin_ia32_psrlw512_mask ((__v32hi) __A, 1362 (__v8hi) __B, 1363 (__v32hi) 1364 _mm512_setzero_si512 (), 1365 (__mmask32) __U); 1366 } 1367 1368 extern __inline __m512i 1369 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1370 _mm512_packs_epi16 (__m512i __A, __m512i __B) 1371 { 1372 return (__m512i) __builtin_ia32_packsswb512_mask ((__v32hi) __A, 1373 (__v32hi) __B, 1374 (__v64qi) 1375 _mm512_setzero_si512 (), 1376 (__mmask64) -1); 1377 } 1378 1379 extern __inline __m512i 1380 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1381 _mm512_sll_epi16 (__m512i __A, __m128i __B) 1382 { 1383 return (__m512i) __builtin_ia32_psllw512_mask ((__v32hi) __A, 1384 (__v8hi) __B, 1385 (__v32hi) 1386 _mm512_setzero_si512 (), 1387 (__mmask32) -1); 1388 } 1389 1390 extern __inline __m512i 1391 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1392 _mm512_mask_sll_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 1393 __m128i __B) 1394 { 1395 return (__m512i) __builtin_ia32_psllw512_mask ((__v32hi) __A, 1396 (__v8hi) __B, 1397 (__v32hi) __W, 1398 (__mmask32) __U); 1399 } 1400 1401 extern __inline __m512i 1402 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1403 _mm512_maskz_sll_epi16 (__mmask32 __U, __m512i __A, __m128i __B) 1404 { 1405 return (__m512i) __builtin_ia32_psllw512_mask ((__v32hi) __A, 1406 (__v8hi) __B, 1407 (__v32hi) 1408 _mm512_setzero_si512 (), 1409 (__mmask32) __U); 1410 } 1411 1412 extern __inline __m512i 1413 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1414 _mm512_maddubs_epi16 (__m512i __X, __m512i __Y) 1415 { 1416 return (__m512i) __builtin_ia32_pmaddubsw512_mask ((__v64qi) __X, 1417 (__v64qi) __Y, 1418 (__v32hi) 1419 _mm512_setzero_si512 (), 1420 (__mmask32) -1); 1421 } 1422 1423 extern __inline __m512i 1424 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1425 _mm512_mask_maddubs_epi16 (__m512i __W, __mmask32 __U, __m512i __X, 1426 __m512i __Y) 1427 { 1428 return (__m512i) __builtin_ia32_pmaddubsw512_mask ((__v64qi) __X, 1429 (__v64qi) __Y, 1430 (__v32hi) __W, 1431 (__mmask32) __U); 1432 } 1433 1434 extern __inline __m512i 1435 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1436 _mm512_maskz_maddubs_epi16 (__mmask32 __U, __m512i __X, __m512i __Y) 1437 { 1438 return (__m512i) __builtin_ia32_pmaddubsw512_mask ((__v64qi) __X, 1439 (__v64qi) __Y, 1440 (__v32hi) 1441 _mm512_setzero_si512 (), 1442 (__mmask32) __U); 1443 } 1444 1445 extern __inline __m512i 1446 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1447 _mm512_madd_epi16 (__m512i __A, __m512i __B) 1448 { 1449 return (__m512i) __builtin_ia32_pmaddwd512_mask ((__v32hi) __A, 1450 (__v32hi) __B, 1451 (__v16si) 1452 _mm512_setzero_si512 (), 1453 (__mmask16) -1); 1454 } 1455 1456 extern __inline __m512i 1457 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1458 _mm512_mask_madd_epi16 (__m512i __W, __mmask16 __U, __m512i __A, 1459 __m512i __B) 1460 { 1461 return (__m512i) __builtin_ia32_pmaddwd512_mask ((__v32hi) __A, 1462 (__v32hi) __B, 1463 (__v16si) __W, 1464 (__mmask16) __U); 1465 } 1466 1467 extern __inline __m512i 1468 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1469 _mm512_maskz_madd_epi16 (__mmask16 __U, __m512i __A, __m512i __B) 1470 { 1471 return (__m512i) __builtin_ia32_pmaddwd512_mask ((__v32hi) __A, 1472 (__v32hi) __B, 1473 (__v16si) 1474 _mm512_setzero_si512 (), 1475 (__mmask16) __U); 1476 } 1477 1478 extern __inline __m512i 1479 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1480 _mm512_unpackhi_epi8 (__m512i __A, __m512i __B) 1481 { 1482 return (__m512i) __builtin_ia32_punpckhbw512_mask ((__v64qi) __A, 1483 (__v64qi) __B, 1484 (__v64qi) 1485 _mm512_setzero_si512 (), 1486 (__mmask64) -1); 1487 } 1488 1489 extern __inline __m512i 1490 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1491 _mm512_mask_unpackhi_epi8 (__m512i __W, __mmask64 __U, __m512i __A, 1492 __m512i __B) 1493 { 1494 return (__m512i) __builtin_ia32_punpckhbw512_mask ((__v64qi) __A, 1495 (__v64qi) __B, 1496 (__v64qi) __W, 1497 (__mmask64) __U); 1498 } 1499 1500 extern __inline __m512i 1501 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1502 _mm512_maskz_unpackhi_epi8 (__mmask64 __U, __m512i __A, __m512i __B) 1503 { 1504 return (__m512i) __builtin_ia32_punpckhbw512_mask ((__v64qi) __A, 1505 (__v64qi) __B, 1506 (__v64qi) 1507 _mm512_setzero_si512 (), 1508 (__mmask64) __U); 1509 } 1510 1511 extern __inline __m512i 1512 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1513 _mm512_unpackhi_epi16 (__m512i __A, __m512i __B) 1514 { 1515 return (__m512i) __builtin_ia32_punpckhwd512_mask ((__v32hi) __A, 1516 (__v32hi) __B, 1517 (__v32hi) 1518 _mm512_setzero_si512 (), 1519 (__mmask32) -1); 1520 } 1521 1522 extern __inline __m512i 1523 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1524 _mm512_mask_unpackhi_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 1525 __m512i __B) 1526 { 1527 return (__m512i) __builtin_ia32_punpckhwd512_mask ((__v32hi) __A, 1528 (__v32hi) __B, 1529 (__v32hi) __W, 1530 (__mmask32) __U); 1531 } 1532 1533 extern __inline __m512i 1534 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1535 _mm512_maskz_unpackhi_epi16 (__mmask32 __U, __m512i __A, __m512i __B) 1536 { 1537 return (__m512i) __builtin_ia32_punpckhwd512_mask ((__v32hi) __A, 1538 (__v32hi) __B, 1539 (__v32hi) 1540 _mm512_setzero_si512 (), 1541 (__mmask32) __U); 1542 } 1543 1544 extern __inline __m512i 1545 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1546 _mm512_unpacklo_epi8 (__m512i __A, __m512i __B) 1547 { 1548 return (__m512i) __builtin_ia32_punpcklbw512_mask ((__v64qi) __A, 1549 (__v64qi) __B, 1550 (__v64qi) 1551 _mm512_setzero_si512 (), 1552 (__mmask64) -1); 1553 } 1554 1555 extern __inline __m512i 1556 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1557 _mm512_mask_unpacklo_epi8 (__m512i __W, __mmask64 __U, __m512i __A, 1558 __m512i __B) 1559 { 1560 return (__m512i) __builtin_ia32_punpcklbw512_mask ((__v64qi) __A, 1561 (__v64qi) __B, 1562 (__v64qi) __W, 1563 (__mmask64) __U); 1564 } 1565 1566 extern __inline __m512i 1567 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1568 _mm512_maskz_unpacklo_epi8 (__mmask64 __U, __m512i __A, __m512i __B) 1569 { 1570 return (__m512i) __builtin_ia32_punpcklbw512_mask ((__v64qi) __A, 1571 (__v64qi) __B, 1572 (__v64qi) 1573 _mm512_setzero_si512 (), 1574 (__mmask64) __U); 1575 } 1576 1577 extern __inline __m512i 1578 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1579 _mm512_unpacklo_epi16 (__m512i __A, __m512i __B) 1580 { 1581 return (__m512i) __builtin_ia32_punpcklwd512_mask ((__v32hi) __A, 1582 (__v32hi) __B, 1583 (__v32hi) 1584 _mm512_setzero_si512 (), 1585 (__mmask32) -1); 1586 } 1587 1588 extern __inline __m512i 1589 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1590 _mm512_mask_unpacklo_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 1591 __m512i __B) 1592 { 1593 return (__m512i) __builtin_ia32_punpcklwd512_mask ((__v32hi) __A, 1594 (__v32hi) __B, 1595 (__v32hi) __W, 1596 (__mmask32) __U); 1597 } 1598 1599 extern __inline __m512i 1600 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1601 _mm512_maskz_unpacklo_epi16 (__mmask32 __U, __m512i __A, __m512i __B) 1602 { 1603 return (__m512i) __builtin_ia32_punpcklwd512_mask ((__v32hi) __A, 1604 (__v32hi) __B, 1605 (__v32hi) 1606 _mm512_setzero_si512 (), 1607 (__mmask32) __U); 1608 } 1609 1610 extern __inline __mmask64 1611 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1612 _mm512_cmpeq_epu8_mask (__m512i __A, __m512i __B) 1613 { 1614 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __A, 1615 (__v64qi) __B, 0, 1616 (__mmask64) -1); 1617 } 1618 1619 extern __inline __mmask64 1620 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1621 _mm512_cmpeq_epi8_mask (__m512i __A, __m512i __B) 1622 { 1623 return (__mmask64) __builtin_ia32_pcmpeqb512_mask ((__v64qi) __A, 1624 (__v64qi) __B, 1625 (__mmask64) -1); 1626 } 1627 1628 extern __inline __mmask64 1629 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1630 _mm512_mask_cmpeq_epu8_mask (__mmask64 __U, __m512i __A, __m512i __B) 1631 { 1632 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __A, 1633 (__v64qi) __B, 0, 1634 __U); 1635 } 1636 1637 extern __inline __mmask64 1638 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1639 _mm512_mask_cmpeq_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B) 1640 { 1641 return (__mmask64) __builtin_ia32_pcmpeqb512_mask ((__v64qi) __A, 1642 (__v64qi) __B, 1643 __U); 1644 } 1645 1646 extern __inline __mmask32 1647 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1648 _mm512_cmpeq_epu16_mask (__m512i __A, __m512i __B) 1649 { 1650 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __A, 1651 (__v32hi) __B, 0, 1652 (__mmask32) -1); 1653 } 1654 1655 extern __inline __mmask32 1656 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1657 _mm512_cmpeq_epi16_mask (__m512i __A, __m512i __B) 1658 { 1659 return (__mmask32) __builtin_ia32_pcmpeqw512_mask ((__v32hi) __A, 1660 (__v32hi) __B, 1661 (__mmask32) -1); 1662 } 1663 1664 extern __inline __mmask32 1665 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1666 _mm512_mask_cmpeq_epu16_mask (__mmask32 __U, __m512i __A, __m512i __B) 1667 { 1668 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __A, 1669 (__v32hi) __B, 0, 1670 __U); 1671 } 1672 1673 extern __inline __mmask32 1674 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1675 _mm512_mask_cmpeq_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B) 1676 { 1677 return (__mmask32) __builtin_ia32_pcmpeqw512_mask ((__v32hi) __A, 1678 (__v32hi) __B, 1679 __U); 1680 } 1681 1682 extern __inline __mmask64 1683 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1684 _mm512_cmpgt_epu8_mask (__m512i __A, __m512i __B) 1685 { 1686 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __A, 1687 (__v64qi) __B, 6, 1688 (__mmask64) -1); 1689 } 1690 1691 extern __inline __mmask64 1692 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1693 _mm512_cmpgt_epi8_mask (__m512i __A, __m512i __B) 1694 { 1695 return (__mmask64) __builtin_ia32_pcmpgtb512_mask ((__v64qi) __A, 1696 (__v64qi) __B, 1697 (__mmask64) -1); 1698 } 1699 1700 extern __inline __mmask64 1701 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1702 _mm512_mask_cmpgt_epu8_mask (__mmask64 __U, __m512i __A, __m512i __B) 1703 { 1704 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __A, 1705 (__v64qi) __B, 6, 1706 __U); 1707 } 1708 1709 extern __inline __mmask64 1710 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1711 _mm512_mask_cmpgt_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B) 1712 { 1713 return (__mmask64) __builtin_ia32_pcmpgtb512_mask ((__v64qi) __A, 1714 (__v64qi) __B, 1715 __U); 1716 } 1717 1718 extern __inline __mmask32 1719 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1720 _mm512_cmpgt_epu16_mask (__m512i __A, __m512i __B) 1721 { 1722 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __A, 1723 (__v32hi) __B, 6, 1724 (__mmask32) -1); 1725 } 1726 1727 extern __inline __mmask32 1728 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1729 _mm512_cmpgt_epi16_mask (__m512i __A, __m512i __B) 1730 { 1731 return (__mmask32) __builtin_ia32_pcmpgtw512_mask ((__v32hi) __A, 1732 (__v32hi) __B, 1733 (__mmask32) -1); 1734 } 1735 1736 extern __inline __mmask32 1737 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1738 _mm512_mask_cmpgt_epu16_mask (__mmask32 __U, __m512i __A, __m512i __B) 1739 { 1740 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __A, 1741 (__v32hi) __B, 6, 1742 __U); 1743 } 1744 1745 extern __inline __mmask32 1746 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1747 _mm512_mask_cmpgt_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B) 1748 { 1749 return (__mmask32) __builtin_ia32_pcmpgtw512_mask ((__v32hi) __A, 1750 (__v32hi) __B, 1751 __U); 1752 } 1753 1754 extern __inline __mmask64 1755 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1756 _mm512_movepi8_mask (__m512i __A) 1757 { 1758 return (__mmask64) __builtin_ia32_cvtb2mask512 ((__v64qi) __A); 1759 } 1760 1761 extern __inline __mmask32 1762 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1763 _mm512_movepi16_mask (__m512i __A) 1764 { 1765 return (__mmask32) __builtin_ia32_cvtw2mask512 ((__v32hi) __A); 1766 } 1767 1768 extern __inline __m512i 1769 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1770 _mm512_movm_epi8 (__mmask64 __A) 1771 { 1772 return (__m512i) __builtin_ia32_cvtmask2b512 (__A); 1773 } 1774 1775 extern __inline __m512i 1776 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1777 _mm512_movm_epi16 (__mmask32 __A) 1778 { 1779 return (__m512i) __builtin_ia32_cvtmask2w512 (__A); 1780 } 1781 1782 extern __inline __mmask64 1783 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1784 _mm512_test_epi8_mask (__m512i __A, __m512i __B) 1785 { 1786 return (__mmask64) __builtin_ia32_ptestmb512 ((__v64qi) __A, 1787 (__v64qi) __B, 1788 (__mmask64) -1); 1789 } 1790 1791 extern __inline __mmask64 1792 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1793 _mm512_mask_test_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B) 1794 { 1795 return (__mmask64) __builtin_ia32_ptestmb512 ((__v64qi) __A, 1796 (__v64qi) __B, __U); 1797 } 1798 1799 extern __inline __mmask32 1800 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1801 _mm512_test_epi16_mask (__m512i __A, __m512i __B) 1802 { 1803 return (__mmask32) __builtin_ia32_ptestmw512 ((__v32hi) __A, 1804 (__v32hi) __B, 1805 (__mmask32) -1); 1806 } 1807 1808 extern __inline __mmask32 1809 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1810 _mm512_mask_test_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B) 1811 { 1812 return (__mmask32) __builtin_ia32_ptestmw512 ((__v32hi) __A, 1813 (__v32hi) __B, __U); 1814 } 1815 1816 extern __inline __mmask64 1817 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1818 _mm512_testn_epi8_mask (__m512i __A, __m512i __B) 1819 { 1820 return (__mmask64) __builtin_ia32_ptestnmb512 ((__v64qi) __A, 1821 (__v64qi) __B, 1822 (__mmask64) -1); 1823 } 1824 1825 extern __inline __mmask64 1826 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1827 _mm512_mask_testn_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B) 1828 { 1829 return (__mmask64) __builtin_ia32_ptestnmb512 ((__v64qi) __A, 1830 (__v64qi) __B, __U); 1831 } 1832 1833 extern __inline __mmask32 1834 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1835 _mm512_testn_epi16_mask (__m512i __A, __m512i __B) 1836 { 1837 return (__mmask32) __builtin_ia32_ptestnmw512 ((__v32hi) __A, 1838 (__v32hi) __B, 1839 (__mmask32) -1); 1840 } 1841 1842 extern __inline __mmask32 1843 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1844 _mm512_mask_testn_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B) 1845 { 1846 return (__mmask32) __builtin_ia32_ptestnmw512 ((__v32hi) __A, 1847 (__v32hi) __B, __U); 1848 } 1849 1850 extern __inline __m512i 1851 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1852 _mm512_shuffle_epi8 (__m512i __A, __m512i __B) 1853 { 1854 return (__m512i) __builtin_ia32_pshufb512_mask ((__v64qi) __A, 1855 (__v64qi) __B, 1856 (__v64qi) 1857 _mm512_setzero_si512 (), 1858 (__mmask64) -1); 1859 } 1860 1861 extern __inline __m512i 1862 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1863 _mm512_mask_shuffle_epi8 (__m512i __W, __mmask64 __U, __m512i __A, 1864 __m512i __B) 1865 { 1866 return (__m512i) __builtin_ia32_pshufb512_mask ((__v64qi) __A, 1867 (__v64qi) __B, 1868 (__v64qi) __W, 1869 (__mmask64) __U); 1870 } 1871 1872 extern __inline __m512i 1873 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1874 _mm512_maskz_shuffle_epi8 (__mmask64 __U, __m512i __A, __m512i __B) 1875 { 1876 return (__m512i) __builtin_ia32_pshufb512_mask ((__v64qi) __A, 1877 (__v64qi) __B, 1878 (__v64qi) 1879 _mm512_setzero_si512 (), 1880 (__mmask64) __U); 1881 } 1882 1883 extern __inline __m512i 1884 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1885 _mm512_min_epu16 (__m512i __A, __m512i __B) 1886 { 1887 return (__m512i) __builtin_ia32_pminuw512_mask ((__v32hi) __A, 1888 (__v32hi) __B, 1889 (__v32hi) 1890 _mm512_setzero_si512 (), 1891 (__mmask32) -1); 1892 } 1893 1894 extern __inline __m512i 1895 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1896 _mm512_maskz_min_epu16 (__mmask32 __M, __m512i __A, __m512i __B) 1897 { 1898 return (__m512i) __builtin_ia32_pminuw512_mask ((__v32hi) __A, 1899 (__v32hi) __B, 1900 (__v32hi) 1901 _mm512_setzero_si512 (), 1902 (__mmask32) __M); 1903 } 1904 1905 extern __inline __m512i 1906 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1907 _mm512_mask_min_epu16 (__m512i __W, __mmask32 __M, __m512i __A, 1908 __m512i __B) 1909 { 1910 return (__m512i) __builtin_ia32_pminuw512_mask ((__v32hi) __A, 1911 (__v32hi) __B, 1912 (__v32hi) __W, 1913 (__mmask32) __M); 1914 } 1915 1916 extern __inline __m512i 1917 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1918 _mm512_min_epi16 (__m512i __A, __m512i __B) 1919 { 1920 return (__m512i) __builtin_ia32_pminsw512_mask ((__v32hi) __A, 1921 (__v32hi) __B, 1922 (__v32hi) 1923 _mm512_setzero_si512 (), 1924 (__mmask32) -1); 1925 } 1926 1927 extern __inline __m512i 1928 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1929 _mm512_maskz_min_epi16 (__mmask32 __M, __m512i __A, __m512i __B) 1930 { 1931 return (__m512i) __builtin_ia32_pminsw512_mask ((__v32hi) __A, 1932 (__v32hi) __B, 1933 (__v32hi) 1934 _mm512_setzero_si512 (), 1935 (__mmask32) __M); 1936 } 1937 1938 extern __inline __m512i 1939 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1940 _mm512_mask_min_epi16 (__m512i __W, __mmask32 __M, __m512i __A, 1941 __m512i __B) 1942 { 1943 return (__m512i) __builtin_ia32_pminsw512_mask ((__v32hi) __A, 1944 (__v32hi) __B, 1945 (__v32hi) __W, 1946 (__mmask32) __M); 1947 } 1948 1949 extern __inline __m512i 1950 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1951 _mm512_max_epu8 (__m512i __A, __m512i __B) 1952 { 1953 return (__m512i) __builtin_ia32_pmaxub512_mask ((__v64qi) __A, 1954 (__v64qi) __B, 1955 (__v64qi) 1956 _mm512_setzero_si512 (), 1957 (__mmask64) -1); 1958 } 1959 1960 extern __inline __m512i 1961 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1962 _mm512_maskz_max_epu8 (__mmask64 __M, __m512i __A, __m512i __B) 1963 { 1964 return (__m512i) __builtin_ia32_pmaxub512_mask ((__v64qi) __A, 1965 (__v64qi) __B, 1966 (__v64qi) 1967 _mm512_setzero_si512 (), 1968 (__mmask64) __M); 1969 } 1970 1971 extern __inline __m512i 1972 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1973 _mm512_mask_max_epu8 (__m512i __W, __mmask64 __M, __m512i __A, 1974 __m512i __B) 1975 { 1976 return (__m512i) __builtin_ia32_pmaxub512_mask ((__v64qi) __A, 1977 (__v64qi) __B, 1978 (__v64qi) __W, 1979 (__mmask64) __M); 1980 } 1981 1982 extern __inline __m512i 1983 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1984 _mm512_max_epi8 (__m512i __A, __m512i __B) 1985 { 1986 return (__m512i) __builtin_ia32_pmaxsb512_mask ((__v64qi) __A, 1987 (__v64qi) __B, 1988 (__v64qi) 1989 _mm512_setzero_si512 (), 1990 (__mmask64) -1); 1991 } 1992 1993 extern __inline __m512i 1994 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1995 _mm512_maskz_max_epi8 (__mmask64 __M, __m512i __A, __m512i __B) 1996 { 1997 return (__m512i) __builtin_ia32_pmaxsb512_mask ((__v64qi) __A, 1998 (__v64qi) __B, 1999 (__v64qi) 2000 _mm512_setzero_si512 (), 2001 (__mmask64) __M); 2002 } 2003 2004 extern __inline __m512i 2005 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2006 _mm512_mask_max_epi8 (__m512i __W, __mmask64 __M, __m512i __A, 2007 __m512i __B) 2008 { 2009 return (__m512i) __builtin_ia32_pmaxsb512_mask ((__v64qi) __A, 2010 (__v64qi) __B, 2011 (__v64qi) __W, 2012 (__mmask64) __M); 2013 } 2014 2015 extern __inline __m512i 2016 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2017 _mm512_min_epu8 (__m512i __A, __m512i __B) 2018 { 2019 return (__m512i) __builtin_ia32_pminub512_mask ((__v64qi) __A, 2020 (__v64qi) __B, 2021 (__v64qi) 2022 _mm512_setzero_si512 (), 2023 (__mmask64) -1); 2024 } 2025 2026 extern __inline __m512i 2027 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2028 _mm512_maskz_min_epu8 (__mmask64 __M, __m512i __A, __m512i __B) 2029 { 2030 return (__m512i) __builtin_ia32_pminub512_mask ((__v64qi) __A, 2031 (__v64qi) __B, 2032 (__v64qi) 2033 _mm512_setzero_si512 (), 2034 (__mmask64) __M); 2035 } 2036 2037 extern __inline __m512i 2038 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2039 _mm512_mask_min_epu8 (__m512i __W, __mmask64 __M, __m512i __A, 2040 __m512i __B) 2041 { 2042 return (__m512i) __builtin_ia32_pminub512_mask ((__v64qi) __A, 2043 (__v64qi) __B, 2044 (__v64qi) __W, 2045 (__mmask64) __M); 2046 } 2047 2048 extern __inline __m512i 2049 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2050 _mm512_min_epi8 (__m512i __A, __m512i __B) 2051 { 2052 return (__m512i) __builtin_ia32_pminsb512_mask ((__v64qi) __A, 2053 (__v64qi) __B, 2054 (__v64qi) 2055 _mm512_setzero_si512 (), 2056 (__mmask64) -1); 2057 } 2058 2059 extern __inline __m512i 2060 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2061 _mm512_maskz_min_epi8 (__mmask64 __M, __m512i __A, __m512i __B) 2062 { 2063 return (__m512i) __builtin_ia32_pminsb512_mask ((__v64qi) __A, 2064 (__v64qi) __B, 2065 (__v64qi) 2066 _mm512_setzero_si512 (), 2067 (__mmask64) __M); 2068 } 2069 2070 extern __inline __m512i 2071 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2072 _mm512_mask_min_epi8 (__m512i __W, __mmask64 __M, __m512i __A, 2073 __m512i __B) 2074 { 2075 return (__m512i) __builtin_ia32_pminsb512_mask ((__v64qi) __A, 2076 (__v64qi) __B, 2077 (__v64qi) __W, 2078 (__mmask64) __M); 2079 } 2080 2081 extern __inline __m512i 2082 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2083 _mm512_max_epi16 (__m512i __A, __m512i __B) 2084 { 2085 return (__m512i) __builtin_ia32_pmaxsw512_mask ((__v32hi) __A, 2086 (__v32hi) __B, 2087 (__v32hi) 2088 _mm512_setzero_si512 (), 2089 (__mmask32) -1); 2090 } 2091 2092 extern __inline __m512i 2093 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2094 _mm512_maskz_max_epi16 (__mmask32 __M, __m512i __A, __m512i __B) 2095 { 2096 return (__m512i) __builtin_ia32_pmaxsw512_mask ((__v32hi) __A, 2097 (__v32hi) __B, 2098 (__v32hi) 2099 _mm512_setzero_si512 (), 2100 (__mmask32) __M); 2101 } 2102 2103 extern __inline __m512i 2104 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2105 _mm512_mask_max_epi16 (__m512i __W, __mmask32 __M, __m512i __A, 2106 __m512i __B) 2107 { 2108 return (__m512i) __builtin_ia32_pmaxsw512_mask ((__v32hi) __A, 2109 (__v32hi) __B, 2110 (__v32hi) __W, 2111 (__mmask32) __M); 2112 } 2113 2114 extern __inline __m512i 2115 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2116 _mm512_max_epu16 (__m512i __A, __m512i __B) 2117 { 2118 return (__m512i) __builtin_ia32_pmaxuw512_mask ((__v32hi) __A, 2119 (__v32hi) __B, 2120 (__v32hi) 2121 _mm512_setzero_si512 (), 2122 (__mmask32) -1); 2123 } 2124 2125 extern __inline __m512i 2126 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2127 _mm512_maskz_max_epu16 (__mmask32 __M, __m512i __A, __m512i __B) 2128 { 2129 return (__m512i) __builtin_ia32_pmaxuw512_mask ((__v32hi) __A, 2130 (__v32hi) __B, 2131 (__v32hi) 2132 _mm512_setzero_si512 (), 2133 (__mmask32) __M); 2134 } 2135 2136 extern __inline __m512i 2137 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2138 _mm512_mask_max_epu16 (__m512i __W, __mmask32 __M, __m512i __A, 2139 __m512i __B) 2140 { 2141 return (__m512i) __builtin_ia32_pmaxuw512_mask ((__v32hi) __A, 2142 (__v32hi) __B, 2143 (__v32hi) __W, 2144 (__mmask32) __M); 2145 } 2146 2147 extern __inline __m512i 2148 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2149 _mm512_sra_epi16 (__m512i __A, __m128i __B) 2150 { 2151 return (__m512i) __builtin_ia32_psraw512_mask ((__v32hi) __A, 2152 (__v8hi) __B, 2153 (__v32hi) 2154 _mm512_setzero_si512 (), 2155 (__mmask32) -1); 2156 } 2157 2158 extern __inline __m512i 2159 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2160 _mm512_mask_sra_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 2161 __m128i __B) 2162 { 2163 return (__m512i) __builtin_ia32_psraw512_mask ((__v32hi) __A, 2164 (__v8hi) __B, 2165 (__v32hi) __W, 2166 (__mmask32) __U); 2167 } 2168 2169 extern __inline __m512i 2170 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2171 _mm512_maskz_sra_epi16 (__mmask32 __U, __m512i __A, __m128i __B) 2172 { 2173 return (__m512i) __builtin_ia32_psraw512_mask ((__v32hi) __A, 2174 (__v8hi) __B, 2175 (__v32hi) 2176 _mm512_setzero_si512 (), 2177 (__mmask32) __U); 2178 } 2179 2180 extern __inline __m512i 2181 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2182 _mm512_srav_epi16 (__m512i __A, __m512i __B) 2183 { 2184 return (__m512i) __builtin_ia32_psrav32hi_mask ((__v32hi) __A, 2185 (__v32hi) __B, 2186 (__v32hi) 2187 _mm512_setzero_si512 (), 2188 (__mmask32) -1); 2189 } 2190 2191 extern __inline __m512i 2192 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2193 _mm512_mask_srav_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 2194 __m512i __B) 2195 { 2196 return (__m512i) __builtin_ia32_psrav32hi_mask ((__v32hi) __A, 2197 (__v32hi) __B, 2198 (__v32hi) __W, 2199 (__mmask32) __U); 2200 } 2201 2202 extern __inline __m512i 2203 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2204 _mm512_maskz_srav_epi16 (__mmask32 __U, __m512i __A, __m512i __B) 2205 { 2206 return (__m512i) __builtin_ia32_psrav32hi_mask ((__v32hi) __A, 2207 (__v32hi) __B, 2208 (__v32hi) 2209 _mm512_setzero_si512 (), 2210 (__mmask32) __U); 2211 } 2212 2213 extern __inline __m512i 2214 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2215 _mm512_srlv_epi16 (__m512i __A, __m512i __B) 2216 { 2217 return (__m512i) __builtin_ia32_psrlv32hi_mask ((__v32hi) __A, 2218 (__v32hi) __B, 2219 (__v32hi) 2220 _mm512_setzero_si512 (), 2221 (__mmask32) -1); 2222 } 2223 2224 extern __inline __m512i 2225 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2226 _mm512_mask_srlv_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 2227 __m512i __B) 2228 { 2229 return (__m512i) __builtin_ia32_psrlv32hi_mask ((__v32hi) __A, 2230 (__v32hi) __B, 2231 (__v32hi) __W, 2232 (__mmask32) __U); 2233 } 2234 2235 extern __inline __m512i 2236 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2237 _mm512_maskz_srlv_epi16 (__mmask32 __U, __m512i __A, __m512i __B) 2238 { 2239 return (__m512i) __builtin_ia32_psrlv32hi_mask ((__v32hi) __A, 2240 (__v32hi) __B, 2241 (__v32hi) 2242 _mm512_setzero_si512 (), 2243 (__mmask32) __U); 2244 } 2245 2246 extern __inline __m512i 2247 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2248 _mm512_sllv_epi16 (__m512i __A, __m512i __B) 2249 { 2250 return (__m512i) __builtin_ia32_psllv32hi_mask ((__v32hi) __A, 2251 (__v32hi) __B, 2252 (__v32hi) 2253 _mm512_setzero_si512 (), 2254 (__mmask32) -1); 2255 } 2256 2257 extern __inline __m512i 2258 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2259 _mm512_mask_sllv_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 2260 __m512i __B) 2261 { 2262 return (__m512i) __builtin_ia32_psllv32hi_mask ((__v32hi) __A, 2263 (__v32hi) __B, 2264 (__v32hi) __W, 2265 (__mmask32) __U); 2266 } 2267 2268 extern __inline __m512i 2269 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2270 _mm512_maskz_sllv_epi16 (__mmask32 __U, __m512i __A, __m512i __B) 2271 { 2272 return (__m512i) __builtin_ia32_psllv32hi_mask ((__v32hi) __A, 2273 (__v32hi) __B, 2274 (__v32hi) 2275 _mm512_setzero_si512 (), 2276 (__mmask32) __U); 2277 } 2278 2279 extern __inline __m512i 2280 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2281 _mm512_mask_packs_epi16 (__m512i __W, __mmask64 __M, __m512i __A, 2282 __m512i __B) 2283 { 2284 return (__m512i) __builtin_ia32_packsswb512_mask ((__v32hi) __A, 2285 (__v32hi) __B, 2286 (__v64qi) __W, 2287 (__mmask64) __M); 2288 } 2289 2290 extern __inline __m512i 2291 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2292 _mm512_maskz_packs_epi16 (__mmask64 __M, __m512i __A, __m512i __B) 2293 { 2294 return (__m512i) __builtin_ia32_packsswb512_mask ((__v32hi) __A, 2295 (__v32hi) __B, 2296 (__v64qi) 2297 _mm512_setzero_si512 (), 2298 __M); 2299 } 2300 2301 extern __inline __m512i 2302 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2303 _mm512_packus_epi16 (__m512i __A, __m512i __B) 2304 { 2305 return (__m512i) __builtin_ia32_packuswb512_mask ((__v32hi) __A, 2306 (__v32hi) __B, 2307 (__v64qi) 2308 _mm512_setzero_si512 (), 2309 (__mmask64) -1); 2310 } 2311 2312 extern __inline __m512i 2313 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2314 _mm512_mask_packus_epi16 (__m512i __W, __mmask64 __M, __m512i __A, 2315 __m512i __B) 2316 { 2317 return (__m512i) __builtin_ia32_packuswb512_mask ((__v32hi) __A, 2318 (__v32hi) __B, 2319 (__v64qi) __W, 2320 (__mmask64) __M); 2321 } 2322 2323 extern __inline __m512i 2324 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2325 _mm512_maskz_packus_epi16 (__mmask64 __M, __m512i __A, __m512i __B) 2326 { 2327 return (__m512i) __builtin_ia32_packuswb512_mask ((__v32hi) __A, 2328 (__v32hi) __B, 2329 (__v64qi) 2330 _mm512_setzero_si512 (), 2331 (__mmask64) __M); 2332 } 2333 2334 extern __inline __m512i 2335 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2336 _mm512_abs_epi8 (__m512i __A) 2337 { 2338 return (__m512i) __builtin_ia32_pabsb512_mask ((__v64qi) __A, 2339 (__v64qi) 2340 _mm512_setzero_si512 (), 2341 (__mmask64) -1); 2342 } 2343 2344 extern __inline __m512i 2345 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2346 _mm512_mask_abs_epi8 (__m512i __W, __mmask64 __U, __m512i __A) 2347 { 2348 return (__m512i) __builtin_ia32_pabsb512_mask ((__v64qi) __A, 2349 (__v64qi) __W, 2350 (__mmask64) __U); 2351 } 2352 2353 extern __inline __m512i 2354 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2355 _mm512_maskz_abs_epi8 (__mmask64 __U, __m512i __A) 2356 { 2357 return (__m512i) __builtin_ia32_pabsb512_mask ((__v64qi) __A, 2358 (__v64qi) 2359 _mm512_setzero_si512 (), 2360 (__mmask64) __U); 2361 } 2362 2363 extern __inline __m512i 2364 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2365 _mm512_abs_epi16 (__m512i __A) 2366 { 2367 return (__m512i) __builtin_ia32_pabsw512_mask ((__v32hi) __A, 2368 (__v32hi) 2369 _mm512_setzero_si512 (), 2370 (__mmask32) -1); 2371 } 2372 2373 extern __inline __m512i 2374 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2375 _mm512_mask_abs_epi16 (__m512i __W, __mmask32 __U, __m512i __A) 2376 { 2377 return (__m512i) __builtin_ia32_pabsw512_mask ((__v32hi) __A, 2378 (__v32hi) __W, 2379 (__mmask32) __U); 2380 } 2381 2382 extern __inline __m512i 2383 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2384 _mm512_maskz_abs_epi16 (__mmask32 __U, __m512i __A) 2385 { 2386 return (__m512i) __builtin_ia32_pabsw512_mask ((__v32hi) __A, 2387 (__v32hi) 2388 _mm512_setzero_si512 (), 2389 (__mmask32) __U); 2390 } 2391 2392 extern __inline __mmask64 2393 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2394 _mm512_mask_cmpneq_epu8_mask (__mmask64 __M, __m512i __X, __m512i __Y) 2395 { 2396 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X, 2397 (__v64qi) __Y, 4, 2398 (__mmask64) __M); 2399 } 2400 2401 extern __inline __mmask64 2402 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2403 _mm512_mask_cmplt_epu8_mask (__mmask64 __M, __m512i __X, __m512i __Y) 2404 { 2405 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X, 2406 (__v64qi) __Y, 1, 2407 (__mmask64) __M); 2408 } 2409 2410 extern __inline __mmask64 2411 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2412 _mm512_mask_cmpge_epu8_mask (__mmask64 __M, __m512i __X, __m512i __Y) 2413 { 2414 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X, 2415 (__v64qi) __Y, 5, 2416 (__mmask64) __M); 2417 } 2418 2419 extern __inline __mmask64 2420 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2421 _mm512_mask_cmple_epu8_mask (__mmask64 __M, __m512i __X, __m512i __Y) 2422 { 2423 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X, 2424 (__v64qi) __Y, 2, 2425 (__mmask64) __M); 2426 } 2427 2428 extern __inline __mmask32 2429 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2430 _mm512_mask_cmpneq_epu16_mask (__mmask32 __M, __m512i __X, __m512i __Y) 2431 { 2432 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X, 2433 (__v32hi) __Y, 4, 2434 (__mmask32) __M); 2435 } 2436 2437 extern __inline __mmask32 2438 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2439 _mm512_mask_cmplt_epu16_mask (__mmask32 __M, __m512i __X, __m512i __Y) 2440 { 2441 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X, 2442 (__v32hi) __Y, 1, 2443 (__mmask32) __M); 2444 } 2445 2446 extern __inline __mmask32 2447 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2448 _mm512_mask_cmpge_epu16_mask (__mmask32 __M, __m512i __X, __m512i __Y) 2449 { 2450 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X, 2451 (__v32hi) __Y, 5, 2452 (__mmask32) __M); 2453 } 2454 2455 extern __inline __mmask32 2456 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2457 _mm512_mask_cmple_epu16_mask (__mmask32 __M, __m512i __X, __m512i __Y) 2458 { 2459 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X, 2460 (__v32hi) __Y, 2, 2461 (__mmask32) __M); 2462 } 2463 2464 extern __inline __mmask64 2465 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2466 _mm512_mask_cmpneq_epi8_mask (__mmask64 __M, __m512i __X, __m512i __Y) 2467 { 2468 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X, 2469 (__v64qi) __Y, 4, 2470 (__mmask64) __M); 2471 } 2472 2473 extern __inline __mmask64 2474 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2475 _mm512_mask_cmplt_epi8_mask (__mmask64 __M, __m512i __X, __m512i __Y) 2476 { 2477 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X, 2478 (__v64qi) __Y, 1, 2479 (__mmask64) __M); 2480 } 2481 2482 extern __inline __mmask64 2483 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2484 _mm512_mask_cmpge_epi8_mask (__mmask64 __M, __m512i __X, __m512i __Y) 2485 { 2486 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X, 2487 (__v64qi) __Y, 5, 2488 (__mmask64) __M); 2489 } 2490 2491 extern __inline __mmask64 2492 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2493 _mm512_mask_cmple_epi8_mask (__mmask64 __M, __m512i __X, __m512i __Y) 2494 { 2495 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X, 2496 (__v64qi) __Y, 2, 2497 (__mmask64) __M); 2498 } 2499 2500 extern __inline __mmask32 2501 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2502 _mm512_mask_cmpneq_epi16_mask (__mmask32 __M, __m512i __X, __m512i __Y) 2503 { 2504 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X, 2505 (__v32hi) __Y, 4, 2506 (__mmask32) __M); 2507 } 2508 2509 extern __inline __mmask32 2510 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2511 _mm512_mask_cmplt_epi16_mask (__mmask32 __M, __m512i __X, __m512i __Y) 2512 { 2513 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X, 2514 (__v32hi) __Y, 1, 2515 (__mmask32) __M); 2516 } 2517 2518 extern __inline __mmask32 2519 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2520 _mm512_mask_cmpge_epi16_mask (__mmask32 __M, __m512i __X, __m512i __Y) 2521 { 2522 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X, 2523 (__v32hi) __Y, 5, 2524 (__mmask32) __M); 2525 } 2526 2527 extern __inline __mmask32 2528 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2529 _mm512_mask_cmple_epi16_mask (__mmask32 __M, __m512i __X, __m512i __Y) 2530 { 2531 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X, 2532 (__v32hi) __Y, 2, 2533 (__mmask32) __M); 2534 } 2535 2536 extern __inline __mmask64 2537 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2538 _mm512_cmpneq_epu8_mask (__m512i __X, __m512i __Y) 2539 { 2540 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X, 2541 (__v64qi) __Y, 4, 2542 (__mmask64) -1); 2543 } 2544 2545 extern __inline __mmask64 2546 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2547 _mm512_cmplt_epu8_mask (__m512i __X, __m512i __Y) 2548 { 2549 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X, 2550 (__v64qi) __Y, 1, 2551 (__mmask64) -1); 2552 } 2553 2554 extern __inline __mmask64 2555 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2556 _mm512_cmpge_epu8_mask (__m512i __X, __m512i __Y) 2557 { 2558 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X, 2559 (__v64qi) __Y, 5, 2560 (__mmask64) -1); 2561 } 2562 2563 extern __inline __mmask64 2564 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2565 _mm512_cmple_epu8_mask (__m512i __X, __m512i __Y) 2566 { 2567 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X, 2568 (__v64qi) __Y, 2, 2569 (__mmask64) -1); 2570 } 2571 2572 extern __inline __mmask32 2573 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2574 _mm512_cmpneq_epu16_mask (__m512i __X, __m512i __Y) 2575 { 2576 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X, 2577 (__v32hi) __Y, 4, 2578 (__mmask32) -1); 2579 } 2580 2581 extern __inline __mmask32 2582 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2583 _mm512_cmplt_epu16_mask (__m512i __X, __m512i __Y) 2584 { 2585 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X, 2586 (__v32hi) __Y, 1, 2587 (__mmask32) -1); 2588 } 2589 2590 extern __inline __mmask32 2591 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2592 _mm512_cmpge_epu16_mask (__m512i __X, __m512i __Y) 2593 { 2594 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X, 2595 (__v32hi) __Y, 5, 2596 (__mmask32) -1); 2597 } 2598 2599 extern __inline __mmask32 2600 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2601 _mm512_cmple_epu16_mask (__m512i __X, __m512i __Y) 2602 { 2603 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X, 2604 (__v32hi) __Y, 2, 2605 (__mmask32) -1); 2606 } 2607 2608 extern __inline __mmask64 2609 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2610 _mm512_cmpneq_epi8_mask (__m512i __X, __m512i __Y) 2611 { 2612 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X, 2613 (__v64qi) __Y, 4, 2614 (__mmask64) -1); 2615 } 2616 2617 extern __inline __mmask64 2618 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2619 _mm512_cmplt_epi8_mask (__m512i __X, __m512i __Y) 2620 { 2621 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X, 2622 (__v64qi) __Y, 1, 2623 (__mmask64) -1); 2624 } 2625 2626 extern __inline __mmask64 2627 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2628 _mm512_cmpge_epi8_mask (__m512i __X, __m512i __Y) 2629 { 2630 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X, 2631 (__v64qi) __Y, 5, 2632 (__mmask64) -1); 2633 } 2634 2635 extern __inline __mmask64 2636 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2637 _mm512_cmple_epi8_mask (__m512i __X, __m512i __Y) 2638 { 2639 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X, 2640 (__v64qi) __Y, 2, 2641 (__mmask64) -1); 2642 } 2643 2644 extern __inline __mmask32 2645 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2646 _mm512_cmpneq_epi16_mask (__m512i __X, __m512i __Y) 2647 { 2648 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X, 2649 (__v32hi) __Y, 4, 2650 (__mmask32) -1); 2651 } 2652 2653 extern __inline __mmask32 2654 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2655 _mm512_cmplt_epi16_mask (__m512i __X, __m512i __Y) 2656 { 2657 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X, 2658 (__v32hi) __Y, 1, 2659 (__mmask32) -1); 2660 } 2661 2662 extern __inline __mmask32 2663 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2664 _mm512_cmpge_epi16_mask (__m512i __X, __m512i __Y) 2665 { 2666 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X, 2667 (__v32hi) __Y, 5, 2668 (__mmask32) -1); 2669 } 2670 2671 extern __inline __mmask32 2672 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2673 _mm512_cmple_epi16_mask (__m512i __X, __m512i __Y) 2674 { 2675 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X, 2676 (__v32hi) __Y, 2, 2677 (__mmask32) -1); 2678 } 2679 2680 extern __inline __m512i 2681 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2682 _mm512_packs_epi32 (__m512i __A, __m512i __B) 2683 { 2684 return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A, 2685 (__v16si) __B, 2686 (__v32hi) 2687 _mm512_setzero_si512 (), 2688 (__mmask32) -1); 2689 } 2690 2691 extern __inline __m512i 2692 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2693 _mm512_maskz_packs_epi32 (__mmask32 __M, __m512i __A, __m512i __B) 2694 { 2695 return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A, 2696 (__v16si) __B, 2697 (__v32hi) 2698 _mm512_setzero_si512 (), 2699 __M); 2700 } 2701 2702 extern __inline __m512i 2703 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2704 _mm512_mask_packs_epi32 (__m512i __W, __mmask32 __M, __m512i __A, 2705 __m512i __B) 2706 { 2707 return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A, 2708 (__v16si) __B, 2709 (__v32hi) __W, 2710 __M); 2711 } 2712 2713 extern __inline __m512i 2714 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2715 _mm512_packus_epi32 (__m512i __A, __m512i __B) 2716 { 2717 return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A, 2718 (__v16si) __B, 2719 (__v32hi) 2720 _mm512_setzero_si512 (), 2721 (__mmask32) -1); 2722 } 2723 2724 extern __inline __m512i 2725 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2726 _mm512_maskz_packus_epi32 (__mmask32 __M, __m512i __A, __m512i __B) 2727 { 2728 return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A, 2729 (__v16si) __B, 2730 (__v32hi) 2731 _mm512_setzero_si512 (), 2732 __M); 2733 } 2734 2735 extern __inline __m512i 2736 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2737 _mm512_mask_packus_epi32 (__m512i __W, __mmask32 __M, __m512i __A, 2738 __m512i __B) 2739 { 2740 return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A, 2741 (__v16si) __B, 2742 (__v32hi) __W, 2743 __M); 2744 } 2745 2746 #ifdef __OPTIMIZE__ 2747 extern __inline __mmask32 2748 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2749 _kshiftli_mask32 (__mmask32 __A, unsigned int __B) 2750 { 2751 return (__mmask32) __builtin_ia32_kshiftlisi ((__mmask32) __A, 2752 (__mmask8) __B); 2753 } 2754 2755 extern __inline __mmask64 2756 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2757 _kshiftli_mask64 (__mmask64 __A, unsigned int __B) 2758 { 2759 return (__mmask64) __builtin_ia32_kshiftlidi ((__mmask64) __A, 2760 (__mmask8) __B); 2761 } 2762 2763 extern __inline __mmask32 2764 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2765 _kshiftri_mask32 (__mmask32 __A, unsigned int __B) 2766 { 2767 return (__mmask32) __builtin_ia32_kshiftrisi ((__mmask32) __A, 2768 (__mmask8) __B); 2769 } 2770 2771 extern __inline __mmask64 2772 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2773 _kshiftri_mask64 (__mmask64 __A, unsigned int __B) 2774 { 2775 return (__mmask64) __builtin_ia32_kshiftridi ((__mmask64) __A, 2776 (__mmask8) __B); 2777 } 2778 2779 extern __inline __m512i 2780 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2781 _mm512_alignr_epi8 (__m512i __A, __m512i __B, const int __N) 2782 { 2783 return (__m512i) __builtin_ia32_palignr512 ((__v8di) __A, 2784 (__v8di) __B, __N * 8); 2785 } 2786 2787 extern __inline __m512i 2788 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2789 _mm512_mask_alignr_epi8 (__m512i __W, __mmask64 __U, __m512i __A, 2790 __m512i __B, const int __N) 2791 { 2792 return (__m512i) __builtin_ia32_palignr512_mask ((__v8di) __A, 2793 (__v8di) __B, 2794 __N * 8, 2795 (__v8di) __W, 2796 (__mmask64) __U); 2797 } 2798 2799 extern __inline __m512i 2800 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2801 _mm512_maskz_alignr_epi8 (__mmask64 __U, __m512i __A, __m512i __B, 2802 const int __N) 2803 { 2804 return (__m512i) __builtin_ia32_palignr512_mask ((__v8di) __A, 2805 (__v8di) __B, 2806 __N * 8, 2807 (__v8di) 2808 _mm512_setzero_si512 (), 2809 (__mmask64) __U); 2810 } 2811 2812 extern __inline __m512i 2813 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2814 _mm512_dbsad_epu8 (__m512i __A, __m512i __B, const int __imm) 2815 { 2816 return (__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi) __A, 2817 (__v64qi) __B, 2818 __imm, 2819 (__v32hi) 2820 _mm512_setzero_si512 (), 2821 (__mmask32) -1); 2822 } 2823 2824 extern __inline __m512i 2825 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2826 _mm512_mask_dbsad_epu8 (__m512i __W, __mmask32 __U, __m512i __A, 2827 __m512i __B, const int __imm) 2828 { 2829 return (__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi) __A, 2830 (__v64qi) __B, 2831 __imm, 2832 (__v32hi) __W, 2833 (__mmask32) __U); 2834 } 2835 2836 extern __inline __m512i 2837 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2838 _mm512_maskz_dbsad_epu8 (__mmask32 __U, __m512i __A, __m512i __B, 2839 const int __imm) 2840 { 2841 return (__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi) __A, 2842 (__v64qi) __B, 2843 __imm, 2844 (__v32hi) 2845 _mm512_setzero_si512 (), 2846 (__mmask32) __U); 2847 } 2848 2849 extern __inline __m512i 2850 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2851 _mm512_srli_epi16 (__m512i __A, const int __imm) 2852 { 2853 return (__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi) __A, __imm, 2854 (__v32hi) 2855 _mm512_setzero_si512 (), 2856 (__mmask32) -1); 2857 } 2858 2859 extern __inline __m512i 2860 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2861 _mm512_mask_srli_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 2862 const int __imm) 2863 { 2864 return (__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi) __A, __imm, 2865 (__v32hi) __W, 2866 (__mmask32) __U); 2867 } 2868 2869 extern __inline __m512i 2870 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2871 _mm512_maskz_srli_epi16 (__mmask32 __U, __m512i __A, const int __imm) 2872 { 2873 return (__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi) __A, __imm, 2874 (__v32hi) 2875 _mm512_setzero_si512 (), 2876 (__mmask32) __U); 2877 } 2878 2879 extern __inline __m512i 2880 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2881 _mm512_slli_epi16 (__m512i __A, const int __B) 2882 { 2883 return (__m512i) __builtin_ia32_psllwi512_mask ((__v32hi) __A, __B, 2884 (__v32hi) 2885 _mm512_setzero_si512 (), 2886 (__mmask32) -1); 2887 } 2888 2889 extern __inline __m512i 2890 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2891 _mm512_mask_slli_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 2892 const int __B) 2893 { 2894 return (__m512i) __builtin_ia32_psllwi512_mask ((__v32hi) __A, __B, 2895 (__v32hi) __W, 2896 (__mmask32) __U); 2897 } 2898 2899 extern __inline __m512i 2900 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2901 _mm512_maskz_slli_epi16 (__mmask32 __U, __m512i __A, const int __B) 2902 { 2903 return (__m512i) __builtin_ia32_psllwi512_mask ((__v32hi) __A, __B, 2904 (__v32hi) 2905 _mm512_setzero_si512 (), 2906 (__mmask32) __U); 2907 } 2908 2909 extern __inline __m512i 2910 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2911 _mm512_shufflehi_epi16 (__m512i __A, const int __imm) 2912 { 2913 return (__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi) __A, 2914 __imm, 2915 (__v32hi) 2916 _mm512_setzero_si512 (), 2917 (__mmask32) -1); 2918 } 2919 2920 extern __inline __m512i 2921 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2922 _mm512_mask_shufflehi_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 2923 const int __imm) 2924 { 2925 return (__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi) __A, 2926 __imm, 2927 (__v32hi) __W, 2928 (__mmask32) __U); 2929 } 2930 2931 extern __inline __m512i 2932 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2933 _mm512_maskz_shufflehi_epi16 (__mmask32 __U, __m512i __A, 2934 const int __imm) 2935 { 2936 return (__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi) __A, 2937 __imm, 2938 (__v32hi) 2939 _mm512_setzero_si512 (), 2940 (__mmask32) __U); 2941 } 2942 2943 extern __inline __m512i 2944 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2945 _mm512_shufflelo_epi16 (__m512i __A, const int __imm) 2946 { 2947 return (__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi) __A, 2948 __imm, 2949 (__v32hi) 2950 _mm512_setzero_si512 (), 2951 (__mmask32) -1); 2952 } 2953 2954 extern __inline __m512i 2955 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2956 _mm512_mask_shufflelo_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 2957 const int __imm) 2958 { 2959 return (__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi) __A, 2960 __imm, 2961 (__v32hi) __W, 2962 (__mmask32) __U); 2963 } 2964 2965 extern __inline __m512i 2966 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2967 _mm512_maskz_shufflelo_epi16 (__mmask32 __U, __m512i __A, 2968 const int __imm) 2969 { 2970 return (__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi) __A, 2971 __imm, 2972 (__v32hi) 2973 _mm512_setzero_si512 (), 2974 (__mmask32) __U); 2975 } 2976 2977 extern __inline __m512i 2978 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2979 _mm512_srai_epi16 (__m512i __A, const int __imm) 2980 { 2981 return (__m512i) __builtin_ia32_psrawi512_mask ((__v32hi) __A, __imm, 2982 (__v32hi) 2983 _mm512_setzero_si512 (), 2984 (__mmask32) -1); 2985 } 2986 2987 extern __inline __m512i 2988 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2989 _mm512_mask_srai_epi16 (__m512i __W, __mmask32 __U, __m512i __A, 2990 const int __imm) 2991 { 2992 return (__m512i) __builtin_ia32_psrawi512_mask ((__v32hi) __A, __imm, 2993 (__v32hi) __W, 2994 (__mmask32) __U); 2995 } 2996 2997 extern __inline __m512i 2998 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 2999 _mm512_maskz_srai_epi16 (__mmask32 __U, __m512i __A, const int __imm) 3000 { 3001 return (__m512i) __builtin_ia32_psrawi512_mask ((__v32hi) __A, __imm, 3002 (__v32hi) 3003 _mm512_setzero_si512 (), 3004 (__mmask32) __U); 3005 } 3006 3007 extern __inline __m512i 3008 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 3009 _mm512_mask_blend_epi16 (__mmask32 __U, __m512i __A, __m512i __W) 3010 { 3011 return (__m512i) __builtin_ia32_blendmw_512_mask ((__v32hi) __A, 3012 (__v32hi) __W, 3013 (__mmask32) __U); 3014 } 3015 3016 extern __inline __m512i 3017 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 3018 _mm512_mask_blend_epi8 (__mmask64 __U, __m512i __A, __m512i __W) 3019 { 3020 return (__m512i) __builtin_ia32_blendmb_512_mask ((__v64qi) __A, 3021 (__v64qi) __W, 3022 (__mmask64) __U); 3023 } 3024 3025 extern __inline __mmask32 3026 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 3027 _mm512_mask_cmp_epi16_mask (__mmask32 __U, __m512i __X, __m512i __Y, 3028 const int __P) 3029 { 3030 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X, 3031 (__v32hi) __Y, __P, 3032 (__mmask32) __U); 3033 } 3034 3035 extern __inline __mmask32 3036 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 3037 _mm512_cmp_epi16_mask (__m512i __X, __m512i __Y, const int __P) 3038 { 3039 return (__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi) __X, 3040 (__v32hi) __Y, __P, 3041 (__mmask32) -1); 3042 } 3043 3044 extern __inline __mmask64 3045 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 3046 _mm512_mask_cmp_epi8_mask (__mmask32 __U, __m512i __X, __m512i __Y, 3047 const int __P) 3048 { 3049 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X, 3050 (__v64qi) __Y, __P, 3051 (__mmask64) __U); 3052 } 3053 3054 extern __inline __mmask64 3055 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 3056 _mm512_cmp_epi8_mask (__m512i __X, __m512i __Y, const int __P) 3057 { 3058 return (__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi) __X, 3059 (__v64qi) __Y, __P, 3060 (__mmask64) -1); 3061 } 3062 3063 extern __inline __mmask32 3064 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 3065 _mm512_mask_cmp_epu16_mask (__mmask32 __U, __m512i __X, __m512i __Y, 3066 const int __P) 3067 { 3068 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X, 3069 (__v32hi) __Y, __P, 3070 (__mmask32) __U); 3071 } 3072 3073 extern __inline __mmask32 3074 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 3075 _mm512_cmp_epu16_mask (__m512i __X, __m512i __Y, const int __P) 3076 { 3077 return (__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi) __X, 3078 (__v32hi) __Y, __P, 3079 (__mmask32) -1); 3080 } 3081 3082 extern __inline __mmask64 3083 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 3084 _mm512_mask_cmp_epu8_mask (__mmask32 __U, __m512i __X, __m512i __Y, 3085 const int __P) 3086 { 3087 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X, 3088 (__v64qi) __Y, __P, 3089 (__mmask64) __U); 3090 } 3091 3092 extern __inline __mmask64 3093 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 3094 _mm512_cmp_epu8_mask (__m512i __X, __m512i __Y, const int __P) 3095 { 3096 return (__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi) __X, 3097 (__v64qi) __Y, __P, 3098 (__mmask64) -1); 3099 } 3100 3101 extern __inline __m512i 3102 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 3103 _mm512_bslli_epi128 (__m512i __A, const int __N) 3104 { 3105 return (__m512i) __builtin_ia32_pslldq512 (__A, __N * 8); 3106 } 3107 3108 extern __inline __m512i 3109 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 3110 _mm512_bsrli_epi128 (__m512i __A, const int __N) 3111 { 3112 return (__m512i) __builtin_ia32_psrldq512 (__A, __N * 8); 3113 } 3114 3115 #else 3116 #define _kshiftli_mask32(X, Y) \ 3117 ((__mmask32) __builtin_ia32_kshiftlisi ((__mmask32)(X), (__mmask8)(Y))) 3118 3119 #define _kshiftli_mask64(X, Y) \ 3120 ((__mmask64) __builtin_ia32_kshiftlidi ((__mmask64)(X), (__mmask8)(Y))) 3121 3122 #define _kshiftri_mask32(X, Y) \ 3123 ((__mmask32) __builtin_ia32_kshiftrisi ((__mmask32)(X), (__mmask8)(Y))) 3124 3125 #define _kshiftri_mask64(X, Y) \ 3126 ((__mmask64) __builtin_ia32_kshiftridi ((__mmask64)(X), (__mmask8)(Y))) 3127 3128 #define _mm512_alignr_epi8(X, Y, N) \ 3129 ((__m512i) __builtin_ia32_palignr512 ((__v8di)(__m512i)(X), \ 3130 (__v8di)(__m512i)(Y), \ 3131 (int)(N * 8))) 3132 3133 #define _mm512_mask_alignr_epi8(W, U, X, Y, N) \ 3134 ((__m512i) __builtin_ia32_palignr512_mask ((__v8di)(__m512i)(X), \ 3135 (__v8di)(__m512i)(Y), (int)(N * 8), \ 3136 (__v8di)(__m512i)(W), (__mmask64)(U))) 3137 3138 #define _mm512_maskz_alignr_epi8(U, X, Y, N) \ 3139 ((__m512i) __builtin_ia32_palignr512_mask ((__v8di)(__m512i)(X), \ 3140 (__v8di)(__m512i)(Y), (int)(N * 8), \ 3141 (__v8di)(__m512i) \ 3142 _mm512_setzero_si512 (), \ 3143 (__mmask64)(U))) 3144 3145 #define _mm512_dbsad_epu8(X, Y, C) \ 3146 ((__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi)(__m512i) (X), \ 3147 (__v64qi)(__m512i) (Y), (int) (C), \ 3148 (__v32hi)(__m512i) \ 3149 _mm512_setzero_si512 (), \ 3150 (__mmask32)-1)) 3151 3152 #define _mm512_mask_dbsad_epu8(W, U, X, Y, C) \ 3153 ((__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi)(__m512i) (X), \ 3154 (__v64qi)(__m512i) (Y), (int) (C), \ 3155 (__v32hi)(__m512i)(W), \ 3156 (__mmask32)(U))) 3157 3158 #define _mm512_maskz_dbsad_epu8(U, X, Y, C) \ 3159 ((__m512i) __builtin_ia32_dbpsadbw512_mask ((__v64qi)(__m512i) (X), \ 3160 (__v64qi)(__m512i) (Y), (int) (C), \ 3161 (__v32hi)(__m512i) \ 3162 _mm512_setzero_si512 (), \ 3163 (__mmask32)(U))) 3164 3165 #define _mm512_srli_epi16(A, B) \ 3166 ((__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi)(__m512i)(A), \ 3167 (int)(B), (__v32hi)_mm512_setzero_si512 (), (__mmask32)-1)) 3168 3169 #define _mm512_mask_srli_epi16(W, U, A, B) \ 3170 ((__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi)(__m512i)(A), \ 3171 (int)(B), (__v32hi)(__m512i)(W), (__mmask32)(U))) 3172 3173 #define _mm512_maskz_srli_epi16(U, A, B) \ 3174 ((__m512i) __builtin_ia32_psrlwi512_mask ((__v32hi)(__m512i)(A), \ 3175 (int)(B), (__v32hi)_mm512_setzero_si512 (), (__mmask32)(U))) 3176 3177 #define _mm512_slli_epi16(X, C) \ 3178 ((__m512i)__builtin_ia32_psllwi512_mask ((__v32hi)(__m512i)(X), (int)(C),\ 3179 (__v32hi)(__m512i)_mm512_setzero_si512 (), \ 3180 (__mmask32)-1)) 3181 3182 #define _mm512_mask_slli_epi16(W, U, X, C) \ 3183 ((__m512i)__builtin_ia32_psllwi512_mask ((__v32hi)(__m512i)(X), (int)(C),\ 3184 (__v32hi)(__m512i)(W),\ 3185 (__mmask32)(U))) 3186 3187 #define _mm512_maskz_slli_epi16(U, X, C) \ 3188 ((__m512i)__builtin_ia32_psllwi512_mask ((__v32hi)(__m512i)(X), (int)(C),\ 3189 (__v32hi)(__m512i)_mm512_setzero_si512 (), \ 3190 (__mmask32)(U))) 3191 3192 #define _mm512_shufflehi_epi16(A, B) \ 3193 ((__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi)(__m512i)(A), (int)(B), \ 3194 (__v32hi)(__m512i) \ 3195 _mm512_setzero_si512 (), \ 3196 (__mmask32)-1)) 3197 3198 #define _mm512_mask_shufflehi_epi16(W, U, A, B) \ 3199 ((__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi)(__m512i)(A), (int)(B), \ 3200 (__v32hi)(__m512i)(W), \ 3201 (__mmask32)(U))) 3202 3203 #define _mm512_maskz_shufflehi_epi16(U, A, B) \ 3204 ((__m512i) __builtin_ia32_pshufhw512_mask ((__v32hi)(__m512i)(A), (int)(B), \ 3205 (__v32hi)(__m512i) \ 3206 _mm512_setzero_si512 (), \ 3207 (__mmask32)(U))) 3208 3209 #define _mm512_shufflelo_epi16(A, B) \ 3210 ((__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi)(__m512i)(A), (int)(B), \ 3211 (__v32hi)(__m512i) \ 3212 _mm512_setzero_si512 (), \ 3213 (__mmask32)-1)) 3214 3215 #define _mm512_mask_shufflelo_epi16(W, U, A, B) \ 3216 ((__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi)(__m512i)(A), (int)(B), \ 3217 (__v32hi)(__m512i)(W), \ 3218 (__mmask32)(U))) 3219 3220 #define _mm512_maskz_shufflelo_epi16(U, A, B) \ 3221 ((__m512i) __builtin_ia32_pshuflw512_mask ((__v32hi)(__m512i)(A), (int)(B), \ 3222 (__v32hi)(__m512i) \ 3223 _mm512_setzero_si512 (), \ 3224 (__mmask32)(U))) 3225 3226 #define _mm512_srai_epi16(A, B) \ 3227 ((__m512i) __builtin_ia32_psrawi512_mask ((__v32hi)(__m512i)(A), \ 3228 (int)(B), (__v32hi)_mm512_setzero_si512 (), (__mmask32)-1)) 3229 3230 #define _mm512_mask_srai_epi16(W, U, A, B) \ 3231 ((__m512i) __builtin_ia32_psrawi512_mask ((__v32hi)(__m512i)(A), \ 3232 (int)(B), (__v32hi)(__m512i)(W), (__mmask32)(U))) 3233 3234 #define _mm512_maskz_srai_epi16(U, A, B) \ 3235 ((__m512i) __builtin_ia32_psrawi512_mask ((__v32hi)(__m512i)(A), \ 3236 (int)(B), (__v32hi)_mm512_setzero_si512 (), (__mmask32)(U))) 3237 3238 #define _mm512_mask_blend_epi16(__U, __A, __W) \ 3239 ((__m512i) __builtin_ia32_blendmw_512_mask ((__v32hi) (__A), \ 3240 (__v32hi) (__W), \ 3241 (__mmask32) (__U))) 3242 3243 #define _mm512_mask_blend_epi8(__U, __A, __W) \ 3244 ((__m512i) __builtin_ia32_blendmb_512_mask ((__v64qi) (__A), \ 3245 (__v64qi) (__W), \ 3246 (__mmask64) (__U))) 3247 3248 #define _mm512_cmp_epi16_mask(X, Y, P) \ 3249 ((__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi)(__m512i)(X), \ 3250 (__v32hi)(__m512i)(Y), (int)(P),\ 3251 (__mmask32)(-1))) 3252 3253 #define _mm512_cmp_epi8_mask(X, Y, P) \ 3254 ((__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi)(__m512i)(X), \ 3255 (__v64qi)(__m512i)(Y), (int)(P),\ 3256 (__mmask64)(-1))) 3257 3258 #define _mm512_cmp_epu16_mask(X, Y, P) \ 3259 ((__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi)(__m512i)(X), \ 3260 (__v32hi)(__m512i)(Y), (int)(P),\ 3261 (__mmask32)(-1))) 3262 3263 #define _mm512_cmp_epu8_mask(X, Y, P) \ 3264 ((__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi)(__m512i)(X), \ 3265 (__v64qi)(__m512i)(Y), (int)(P),\ 3266 (__mmask64)(-1))) 3267 3268 #define _mm512_mask_cmp_epi16_mask(M, X, Y, P) \ 3269 ((__mmask32) __builtin_ia32_cmpw512_mask ((__v32hi)(__m512i)(X), \ 3270 (__v32hi)(__m512i)(Y), (int)(P),\ 3271 (__mmask32)(M))) 3272 3273 #define _mm512_mask_cmp_epi8_mask(M, X, Y, P) \ 3274 ((__mmask64) __builtin_ia32_cmpb512_mask ((__v64qi)(__m512i)(X), \ 3275 (__v64qi)(__m512i)(Y), (int)(P),\ 3276 (__mmask64)(M))) 3277 3278 #define _mm512_mask_cmp_epu16_mask(M, X, Y, P) \ 3279 ((__mmask32) __builtin_ia32_ucmpw512_mask ((__v32hi)(__m512i)(X), \ 3280 (__v32hi)(__m512i)(Y), (int)(P),\ 3281 (__mmask32)(M))) 3282 3283 #define _mm512_mask_cmp_epu8_mask(M, X, Y, P) \ 3284 ((__mmask64) __builtin_ia32_ucmpb512_mask ((__v64qi)(__m512i)(X), \ 3285 (__v64qi)(__m512i)(Y), (int)(P),\ 3286 (__mmask64)(M))) 3287 3288 #define _mm512_bslli_epi128(A, N) \ 3289 ((__m512i)__builtin_ia32_pslldq512 ((__m512i)(A), (int)(N) * 8)) 3290 3291 #define _mm512_bsrli_epi128(A, N) \ 3292 ((__m512i)__builtin_ia32_psrldq512 ((__m512i)(A), (int)(N) * 8)) 3293 3294 #endif 3295 3296 #ifdef __DISABLE_AVX512BW__ 3297 #undef __DISABLE_AVX512BW__ 3298 #pragma GCC pop_options 3299 #endif /* __DISABLE_AVX512BW__ */ 3300 3301 #endif /* _AVX512BWINTRIN_H_INCLUDED */ 3302