v_perm_b32 GPU Native ISA AMD Vector
V PERM B32 Vector Arithmetic
Permute a 64-bit value constructed from two vector inputs (most significant bits come from the first input) using a per-lane selector from the third…
Encoding
Operands
Operand details have not yet been curated for this instruction.
GFX Target Compatibility
| Target | Support |
|---|---|
| gfx1100 | ✅ Supported |
Selects 0 through 7 select the corresponding byte of the 64-bit input value. Selects 8 through 11 are useful in modeling sign extension of a smaller-precision signed integer to a larger- precision result by replicating the leading bit of a selected byte. Selects 12 and 13 return padding values of 0 and 1 bits respectively. Note the MSBs of the 64-bit value being selected are stored in S0. This is counterintuitive for a little-endian architecture.
Related PTX Concepts
Related
More in Vector Arithmetic
Reference
Description
Semantics
Example
v_perm_b32 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 351. - LLVM MC assembler tests for AMDGPU (gfx11) ↗ - LLVM Project