v_cmp_eq_f32 GPU Native ISA AMD Vector
Comparison
Per-lane single-precision equality compare, result written as an execution-mask-width bitmask.
Encoding
The ENC_VOPC layout from AMD's machine-readable ISA specification (AMD CDNA 5). Opcode 18 in OP rebuilds 0x7C240000, an identifier AMD lists for this encoding. Not the same in every generation: AMD CDNA 4 (opcode 66), AMD CDNA 3 (opcode 66), AMD CDNA 2 (opcode 66), AMD CDNA 1 (opcode 66), AMD RDNA 2 (opcode 2), AMD RDNA 1 (opcode 2). The same in AMD RDNA 4, AMD RDNA 3.5, AMD RDNA 3.
Operands
-
VCC
Destination mask (VCC, or an arbitrary SGPR pair for the _e64 encoding) -
S0
First source -
S1
Second source
GFX Target Compatibility
| Target | Support |
|---|---|
| gfx942 | ✅ Supported |
| gfx1100 | ✅ Supported |
Related
More in Comparison
Reference
Description
Semantics
Example
v_cmp_eq_f32 vcc, v0, v1 // vcc[lane] = (v0[lane] == v1[lane])Original illustrative example, written for this site (not reproduced from a specific AMD document).
Sources
- AMD Machine-Readable GPU ISA Specification ↗ - Advanced Micro Devices, Inc.