iadd (sm4 - asm)

Integer addition.

iadd dest[.mask], [-]src0[.swizzle], [-]src1[.swizzle]




[in] The address of the result of the operation.


[in] The number to be added to src1.


[in] The number to be added to src0.



Component-wise add of 32-bit operands src0 and src1, placing the correct 32-bit result in dest. No carry or borrow beyond the 32-bit values of each component is performed, so this instruction is not sensitive to the signed-ness of its operands.

Optional negate modifier on source operands takes 2's complement before performing operation.

This instruction applies to the following shader stages:

Vertex ShaderGeometry ShaderPixel Shader


Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
Shader Model 5 yes
Shader Model 4.1 yes
Shader Model 4 yes
Shader Model 3 (DirectX HLSL) no
Shader Model 2 (DirectX HLSL) no
Shader Model 1 (DirectX HLSL) no


Related topics

Shader Model 4 Assembly (DirectX HLSL)