avx512ifmaintrin.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /* Copyright (C) 2013-2019 Free Software Foundation, Inc.
  2. This file is part of GCC.
  3. GCC is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3, or (at your option)
  6. any later version.
  7. GCC is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. Under Section 7 of GPL version 3, you are granted additional
  12. permissions described in the GCC Runtime Library Exception, version
  13. 3.1, as published by the Free Software Foundation.
  14. You should have received a copy of the GNU General Public License and
  15. a copy of the GCC Runtime Library Exception along with this program;
  16. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  17. <http://www.gnu.org/licenses/>. */
  18. #ifndef _IMMINTRIN_H_INCLUDED
  19. #error "Never use <avx512ifmaintrin.h> directly; include <immintrin.h> instead."
  20. #endif
  21. #ifndef _AVX512IFMAINTRIN_H_INCLUDED
  22. #define _AVX512IFMAINTRIN_H_INCLUDED
  23. #ifndef __AVX512IFMA__
  24. #pragma GCC push_options
  25. #pragma GCC target("avx512ifma")
  26. #define __DISABLE_AVX512IFMA__
  27. #endif /* __AVX512IFMA__ */
  28. extern __inline __m512i
  29. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  30. _mm512_madd52lo_epu64 (__m512i __X, __m512i __Y, __m512i __Z)
  31. {
  32. return (__m512i) __builtin_ia32_vpmadd52luq512_mask ((__v8di) __X,
  33. (__v8di) __Y,
  34. (__v8di) __Z,
  35. (__mmask8) -1);
  36. }
  37. extern __inline __m512i
  38. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  39. _mm512_madd52hi_epu64 (__m512i __X, __m512i __Y, __m512i __Z)
  40. {
  41. return (__m512i) __builtin_ia32_vpmadd52huq512_mask ((__v8di) __X,
  42. (__v8di) __Y,
  43. (__v8di) __Z,
  44. (__mmask8) -1);
  45. }
  46. extern __inline __m512i
  47. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  48. _mm512_mask_madd52lo_epu64 (__m512i __W, __mmask8 __M, __m512i __X,
  49. __m512i __Y)
  50. {
  51. return (__m512i) __builtin_ia32_vpmadd52luq512_mask ((__v8di) __W,
  52. (__v8di) __X,
  53. (__v8di) __Y,
  54. (__mmask8) __M);
  55. }
  56. extern __inline __m512i
  57. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  58. _mm512_mask_madd52hi_epu64 (__m512i __W, __mmask8 __M, __m512i __X,
  59. __m512i __Y)
  60. {
  61. return (__m512i) __builtin_ia32_vpmadd52huq512_mask ((__v8di) __W,
  62. (__v8di) __X,
  63. (__v8di) __Y,
  64. (__mmask8) __M);
  65. }
  66. extern __inline __m512i
  67. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  68. _mm512_maskz_madd52lo_epu64 (__mmask8 __M, __m512i __X, __m512i __Y, __m512i __Z)
  69. {
  70. return (__m512i) __builtin_ia32_vpmadd52luq512_maskz ((__v8di) __X,
  71. (__v8di) __Y,
  72. (__v8di) __Z,
  73. (__mmask8) __M);
  74. }
  75. extern __inline __m512i
  76. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  77. _mm512_maskz_madd52hi_epu64 (__mmask8 __M, __m512i __X, __m512i __Y, __m512i __Z)
  78. {
  79. return (__m512i) __builtin_ia32_vpmadd52huq512_maskz ((__v8di) __X,
  80. (__v8di) __Y,
  81. (__v8di) __Z,
  82. (__mmask8) __M);
  83. }
  84. #ifdef __DISABLE_AVX512IFMA__
  85. #undef __DISABLE_AVX512IFMA__
  86. #pragma GCC pop_options
  87. #endif /* __DISABLE_AVX512IFMA__ */
  88. #endif /* _AVX512IFMAINTRIN_H_INCLUDED */