VFMADDxxxPH - Fused Multiply ADD xxx Packed HalfVFMSUBxxxPH - Fused Multiply SUBtract xxx Packed HalfVFMADDSUBxxxPH - Fused Multiply ADD SUBtract xxx Packed HalfVFMSUBADDxxxPH - Fused Multiply SUBtract ADD xxx Packed HalfVFNMADDxxxPH - Fused Negative Multiply ADD xxx Packed HalfVFNMSUBxxxPH - Fused Negative Multiply SUBtract xxx Packed Half

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
VFMADD213PH (2) * (1) + (3)
VFMADD231PH (2) * (3) + (1)
a * b + c
FMSUB VFMSUB132PH (1) * (3) - (2)
VFMSUB213PH (2) * (1) - (3)
VFMSUB231PH (2) * (3) - (1)
_mm_fmsub_ph
_mm256_fmsub_ph
_mm512_fmsub_ph
a * b - c
FMADDSUB VFMADDSUB132PH (1) * (3) + (2) (1) * (3) - (2)
VFMADDSUB213PH (2) * (1) + (3) (2) * (1) - (3)
VFMADDSUB231PH (2) * (3) + (1) (2) * (3) - (1)
a * b + c a * b - c
FMSUBADD VFMSUBADD132PH (1) * (3) - (2) (1) * (3) + (2)
VFMSUBADD213PH (2) * (1) - (3) (2) * (1) + (3)
VFMSUBADD231PH (2) * (3) - (1) (2) * (3) + (1)
a * b - c a * b + c
VFNMADD213PH - (2) * (1) + (3)
VFNMADD231PH - (2) * (3) + (1)
- a * b + c
FNMSUB VFNMSUB132PH - (1) * (3) - (2)
VFNMSUB213PH - (2) * (1) - (3)
VFNMSUB231PH - (2) * (3) - (1)
_mm_fnmsub_ph
_mm256_fnmsub_ph
_mm512_fnmsub_ph
- 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.

x86/x64 SIMD Instruction List  Feedback