197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper/*===---- fma4intrin.h - FMA4 intrinsics -----------------------------------===
297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper *
397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * Permission is hereby granted, free of charge, to any person obtaining a copy
497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * of this software and associated documentation files (the "Software"), to deal
597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * in the Software without restriction, including without limitation the rights
697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * copies of the Software, and to permit persons to whom the Software is
897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * furnished to do so, subject to the following conditions:
997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper *
1097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * The above copyright notice and this permission notice shall be included in
1197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * all copies or substantial portions of the Software.
1297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper *
1397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper * THE SOFTWARE.
2097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper *
2197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper *===-----------------------------------------------------------------------===
2297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper */
2397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
2497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper#ifndef __IMMINTRIN_H
2597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper#error "Never use <fmaintrin.h> directly; include <immintrin.h> instead."
2697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper#endif
2797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
2897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper#ifndef __FMAINTRIN_H
2997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper#define __FMAINTRIN_H
3097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
3197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper#ifndef __FMA__
3297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper# error "FMA instruction set is not enabled"
3397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper#else
3497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
3597075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
3697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fmadd_ps(__m128 __A, __m128 __B, __m128 __C)
3797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
3897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128)__builtin_ia32_vfmaddps(__A, __B, __C);
3997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
4097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
4197075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
4297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fmadd_pd(__m128d __A, __m128d __B, __m128d __C)
4397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
4497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128d)__builtin_ia32_vfmaddpd(__A, __B, __C);
4597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
4697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
4797075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
4897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fmadd_ss(__m128 __A, __m128 __B, __m128 __C)
4997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
5097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128)__builtin_ia32_vfmaddss(__A, __B, __C);
5197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
5297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
5397075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
5497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fmadd_sd(__m128d __A, __m128d __B, __m128d __C)
5597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
5697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128d)__builtin_ia32_vfmaddsd(__A, __B, __C);
5797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
5897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
5997075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
6097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fmsub_ps(__m128 __A, __m128 __B, __m128 __C)
6197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
6297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128)__builtin_ia32_vfmsubps(__A, __B, __C);
6397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
6497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
6597075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
6697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fmsub_pd(__m128d __A, __m128d __B, __m128d __C)
6797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
6897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128d)__builtin_ia32_vfmsubpd(__A, __B, __C);
6997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
7097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
7197075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
7297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fmsub_ss(__m128 __A, __m128 __B, __m128 __C)
7397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
7497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128)__builtin_ia32_vfmsubss(__A, __B, __C);
7597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
7697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
7797075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
7897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fmsub_sd(__m128d __A, __m128d __B, __m128d __C)
7997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
8097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128d)__builtin_ia32_vfmsubsd(__A, __B, __C);
8197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
8297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
8397075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
8497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fnmadd_ps(__m128 __A, __m128 __B, __m128 __C)
8597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
8697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128)__builtin_ia32_vfnmaddps(__A, __B, __C);
8797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
8897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
8997075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
9097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fnmadd_pd(__m128d __A, __m128d __B, __m128d __C)
9197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
9297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128d)__builtin_ia32_vfnmaddpd(__A, __B, __C);
9397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
9497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
9597075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
9697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fnmadd_ss(__m128 __A, __m128 __B, __m128 __C)
9797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
9897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128)__builtin_ia32_vfnmaddss(__A, __B, __C);
9997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
10097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
10197075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
10297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fnmadd_sd(__m128d __A, __m128d __B, __m128d __C)
10397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
10497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128d)__builtin_ia32_vfnmaddsd(__A, __B, __C);
10597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
10697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
10797075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
10897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fnmsub_ps(__m128 __A, __m128 __B, __m128 __C)
10997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
11097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128)__builtin_ia32_vfnmsubps(__A, __B, __C);
11197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
11297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
11397075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
11497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fnmsub_pd(__m128d __A, __m128d __B, __m128d __C)
11597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
11697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128d)__builtin_ia32_vfnmsubpd(__A, __B, __C);
11797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
11897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
11997075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
12097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fnmsub_ss(__m128 __A, __m128 __B, __m128 __C)
12197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
12297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128)__builtin_ia32_vfnmsubss(__A, __B, __C);
12397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
12497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
12597075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
12697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fnmsub_sd(__m128d __A, __m128d __B, __m128d __C)
12797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
12897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128d)__builtin_ia32_vfnmsubsd(__A, __B, __C);
12997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
13097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
13197075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
13297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fmaddsub_ps(__m128 __A, __m128 __B, __m128 __C)
13397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
13497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128)__builtin_ia32_vfmaddsubps(__A, __B, __C);
13597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
13697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
13797075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
13897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fmaddsub_pd(__m128d __A, __m128d __B, __m128d __C)
13997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
14097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128d)__builtin_ia32_vfmaddsubpd(__A, __B, __C);
14197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
14297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
14397075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
14497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fmsubadd_ps(__m128 __A, __m128 __B, __m128 __C)
14597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
14697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128)__builtin_ia32_vfmsubaddps(__A, __B, __C);
14797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
14897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
14997075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
15097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm_fmsubadd_pd(__m128d __A, __m128d __B, __m128d __C)
15197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
15297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m128d)__builtin_ia32_vfmsubaddpd(__A, __B, __C);
15397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
15497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
15597075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
15697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm256_fmadd_ps(__m256 __A, __m256 __B, __m256 __C)
15797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
15897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m256)__builtin_ia32_vfmaddps256(__A, __B, __C);
15997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
16097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
16197075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
16297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm256_fmadd_pd(__m256d __A, __m256d __B, __m256d __C)
16397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
16497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m256d)__builtin_ia32_vfmaddpd256(__A, __B, __C);
16597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
16697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
16797075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
16897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm256_fmsub_ps(__m256 __A, __m256 __B, __m256 __C)
16997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
17097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m256)__builtin_ia32_vfmsubps256(__A, __B, __C);
17197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
17297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
17397075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
17497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm256_fmsub_pd(__m256d __A, __m256d __B, __m256d __C)
17597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
17697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m256d)__builtin_ia32_vfmsubpd256(__A, __B, __C);
17797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
17897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
17997075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
18097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm256_fnmadd_ps(__m256 __A, __m256 __B, __m256 __C)
18197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
18297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m256)__builtin_ia32_vfnmaddps256(__A, __B, __C);
18397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
18497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
18597075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
18697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm256_fnmadd_pd(__m256d __A, __m256d __B, __m256d __C)
18797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
18897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m256d)__builtin_ia32_vfnmaddpd256(__A, __B, __C);
18997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
19097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
19197075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
19297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm256_fnmsub_ps(__m256 __A, __m256 __B, __m256 __C)
19397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
19497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m256)__builtin_ia32_vfnmsubps256(__A, __B, __C);
19597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
19697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
19797075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
19897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm256_fnmsub_pd(__m256d __A, __m256d __B, __m256d __C)
19997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
20097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m256d)__builtin_ia32_vfnmsubpd256(__A, __B, __C);
20197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
20297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
20397075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
20497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm256_fmaddsub_ps(__m256 __A, __m256 __B, __m256 __C)
20597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
20697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m256)__builtin_ia32_vfmaddsubps256(__A, __B, __C);
20797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
20897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
20997075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
21097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm256_fmaddsub_pd(__m256d __A, __m256d __B, __m256d __C)
21197075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
21297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m256d)__builtin_ia32_vfmaddsubpd256(__A, __B, __C);
21397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
21497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
21597075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m256 __attribute__((__always_inline__, __nodebug__))
21697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm256_fmsubadd_ps(__m256 __A, __m256 __B, __m256 __C)
21797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
21897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m256)__builtin_ia32_vfmsubaddps256(__A, __B, __C);
21997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
22097075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
22197075fb073ffc40aef4c2fdef393b715e514301eCraig Topperstatic __inline__ __m256d __attribute__((__always_inline__, __nodebug__))
22297075fb073ffc40aef4c2fdef393b715e514301eCraig Topper_mm256_fmsubadd_pd(__m256d __A, __m256d __B, __m256d __C)
22397075fb073ffc40aef4c2fdef393b715e514301eCraig Topper{
22497075fb073ffc40aef4c2fdef393b715e514301eCraig Topper  return (__m256d)__builtin_ia32_vfmsubaddpd256(__A, __B, __C);
22597075fb073ffc40aef4c2fdef393b715e514301eCraig Topper}
22697075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
22797075fb073ffc40aef4c2fdef393b715e514301eCraig Topper#endif /* __FMA__ */
22897075fb073ffc40aef4c2fdef393b715e514301eCraig Topper
22997075fb073ffc40aef4c2fdef393b715e514301eCraig Topper#endif /* __FMAINTRIN_H */
230