


For each element, performs MUL and ADD/SUB calculation with 3 operands and store the result in the first operand. (returns the result.)
Which operands to MUL, and which operand to ADD/SUB, depend on the order of the numbers (1, 2, 3) in the instruction name. depend on the order of arguments for intrinsic.
| ????? | instruction name | odd | even |
|---|---|---|---|
| FMADD | VFMADD132PD | (1) * (3) + (2) | |
| VFMADD213PD | (2) * (1) + (3) | ||
| VFMADD231PD | (2) * (3) + (1) | ||
| _mm_fmadd_pd _mm256_fmadd_pd _mm512_fmadd_pd |
a * b + c | ||
| FMSUB | VFMSUB132PD | (1) * (3) - (2) | |
| VFMSUB213PD | (2) * (1) - (3) | ||
| VFMSUB231PD | (2) * (3) - (1) | ||
| _mm_fmsub_pd _mm256_fmsub_pd _mm512_fmsub_pd |
a * b - c | ||
| FMADDSUB | VFMADDSUB132PD | (1) * (3) + (2) | (1) * (3) - (2) |
| VFMADDSUB213PD | (2) * (1) + (3) | (2) * (1) - (3) | |
| VFMADDSUB231PD | (2) * (3) + (1) | (2) * (3) - (1) | |
| _mm_fmaddsub_pd _mm256_fmaddsub_pd _mm512_fmaddsub_pd |
a * b + c | a * b - c | |
| FMSUBADD | VFMSUBADD132PD | (1) * (3) - (2) | (1) * (3) + (2) |
| VFMSUBADD213PD | (2) * (1) - (3) | (2) * (1) + (3) | |
| VFMSUBADD231PD | (2) * (3) - (1) | (2) * (3) + (1) | |
| _mm_fmsubadd_pd _mm256_fmsubadd_pd _mm512_fmsubadd_pd |
a * b - c | a * b + c | |
| FNMADD | VFNMADD132PD | - (1) * (3) + (2) | |
| VFNMADD213PD | - (2) * (1) + (3) | ||
| VFNMADD231PD | - (2) * (3) + (1) | ||
| _mm_fnmadd_pd _mm256_fnmadd_pd _mm512_fnmadd_pd |
- a * b + c | ||
| FNMSUB | VFNMSUB132PD | - (1) * (3) - (2) | |
| VFNMSUB213PD | - (2) * (1) - (3) | ||
| VFNMSUB231PD | - (2) * (3) - (1) | ||
| _mm_fnmsub_pd _mm256_fnmsub_pd _mm512_fnmsub_pd |
- a * b - c | ||
_mask_ if k bit is 0, a is copied.
_mask3_ if k bit is 0, c is copied.
_maskz_ if k bit is 0, zero cleared.