v_mad_u16 GPU Native ISA AMD Vector
V MAD U16 Vector Arithmetic
Multiply two unsigned 16-bit integer inputs, add an unsigned 16-bit integer value from a third input, and store the result into a vector register.
Encoding
Operands
Operand details have not yet been curated for this instruction.
GFX Target Compatibility
| Target | Support |
|---|---|
| gfx1100 | ✅ Supported |
Supports saturation (unsigned 16-bit integer domain). If OPSEL[3] is 0 the result is written to 16 LSBs of destination VGPR and the high 16 bits are preserved. If OPSEL[3] is 1 the result is written to 16 MSBs of destination VGPR and the low 16 bits are preserved.
Related
More in Vector Arithmetic
Reference
Semantics
Example
v_mad_u16 v5, v1, v2, s3A real instruction accepted by the LLVM assembler, taken verbatim from LLVM's own AMDGPU MC test suite (gfx11). Not from an AMD document, and not authored here.
Sources
- User Guide for AMDGPU Backend ↗ - LLVM Project
-
"AMD Instinct MI300" Instruction Set Architecture: Reference Guide ↗
- Advanced Micro Devices, Inc.
Reference Guide, page 357. - LLVM MC assembler tests for AMDGPU (gfx11) ↗ - LLVM Project