s_cmp_lg_u32 GPU Native ISA AMD Scalar
Comparison
Set SCC to 1 iff the first scalar input is less than or greater than the second scalar input.
Encoding
The ENC_SOPC layout from AMD's machine-readable ISA specification (AMD CDNA 5). Opcode 7 in OP rebuilds 0xBF070000, an identifier AMD lists for this encoding. The same in the other 9 generations that define it.
Operands
-
SSRC0
Read. All scalar operands. Covers all operands that are allowed as scalar sources. Data format: Unsigned 32-bit integral data. (OPR_SSRC, FMT_NUM_U32) -
SSRC1
Read. All scalar operands. Covers all operands that are allowed as scalar sources. Data format: Unsigned 32-bit integral data. (OPR_SSRC, FMT_NUM_U32)
In AMD's order, as its machine-readable ISA specification lists them for the ENC_SOPC encoding (AMD CDNA 5).
GFX Target Compatibility
| Target | Support |
|---|---|
| gfx1100 | ✅ Supported |
Note that S_CMP_LG_I32 and S_CMP_LG_U32 are identical opcodes, but both are provided for symmetry.
Related
More in Comparison
Reference
Semantics
Example
s_cmp_lg_u32 s0, 0A real instruction accepted by the LLVM assembler, taken verbatim from LLVM's own AMDGPU MC test suite. 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 134. - LLVM MC assembler tests for AMDGPU ↗ - LLVM Project
- AMD Machine-Readable GPU ISA Specification ↗ - Advanced Micro Devices, Inc.