Extensions
Forms
6 (6 EVEX)
Data
Intel XED v2026.08.23

VALIGND joins its first source above its second and extracts one register’s worth of doublewords starting at the element the immediate names. With an offset of 3 on ZMM registers, the result is elements 3 to 15 of the second source followed by elements 0 to 2 of the first. The operand order is that of PALIGNR, but the shift counts doublewords instead of bytes and runs across the whole register, not within each 128-bit lane as VPALIGNR does. VALIGNQ counts quadwords.

The offset wraps

Only as many low bits of the immediate count as the element count needs: two for XMM, three for YMM, four for ZMM. Larger values wrap instead of shifting in zeros as PALIGNR does, so VALIGND never brings in zeros by itself. In the cases recorded on Zen 5, immediate 5 on XMM registers acted as 1, and FFh on YMM registers as 7. A shift that should bring in zeros takes a zeroed register as the second source. At -O2 with -march=x86-64-v4, GCC 14 passes _mm512_alignr_epi32(a, b, 17) to the assembler as 17, while Clang 23 reduces it to 1, the same instruction in effect.

Rotating and shifting by elements

With the same register in both sources, VALIGND rotates it by whole elements across lanes. For a rotation of sixteen int by one written with __builtin_shufflevector, Clang 23 emits valignd zmm0, zmm0, zmm0, 1, and for a shift by one element that brings in a zero, VALIGND with a zeroed register and offset 15. GCC 14 uses VPERMD for the rotation and VPERMI2D for the shift, each with an index vector loaded from memory. The VPALIGNR page shows VALIGND in Clang’s sliding windows, and the VPSHLDD page how it helps shift a whole register by bits.

Masks and broadcast

The write mask applies per doubleword of the result. A broadcast operand makes the second source one value repeated, and VALIGND then shifts copies of it in: in a recorded case with offset 3, the broadcast doubleword went to every selected element from 0 to 12, and the first three elements of the other source landed in 13 to 15.

AMD’s Zen 5 guide lists VALIGND as one macro-op with a latency of 2, 4 and 5 cycles for XMM, YMM and ZMM.

Forms

Every encoding of VALIGND that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
VALIGND zmm {k}{z}, zmm, zmm, imm8 VALIGND_ZMMu32_MASKmskw_ZMMu32_ZMMu32_IMM8_AVX512EVEX.512.66.0F3A.W0 03 /r ibAVX10.1 or AVX512F
VALIGND zmm {k}{z}, zmm, m512/m32bcst, imm8 VALIGND_ZMMu32_MASKmskw_ZMMu32_MEMu32_IMM8_AVX512EVEX.512.66.0F3A.W0 03 /r ibAVX10.1 or AVX512F
VALIGND xmm {k}{z}, xmm, xmm, imm8 VALIGND_XMMu32_MASKmskw_XMMu32_XMMu32_IMM8_AVX512EVEX.128.66.0F3A.W0 03 /r ibAVX10.1 or AVX512F + AVX512VL
VALIGND xmm {k}{z}, xmm, m128/m32bcst, imm8 VALIGND_XMMu32_MASKmskw_XMMu32_MEMu32_IMM8_AVX512EVEX.128.66.0F3A.W0 03 /r ibAVX10.1 or AVX512F + AVX512VL
VALIGND ymm {k}{z}, ymm, ymm, imm8 VALIGND_YMMu32_MASKmskw_YMMu32_YMMu32_IMM8_AVX512EVEX.256.66.0F3A.W0 03 /r ibAVX10.1 or AVX512F + AVX512VL
VALIGND ymm {k}{z}, ymm, m256/m32bcst, imm8 VALIGND_YMMu32_MASKmskw_YMMu32_MEMu32_IMM8_AVX512EVEX.256.66.0F3A.W0 03 /r ibAVX10.1 or AVX512F + AVX512VL

Latency and throughput

What the scheduling models of LLVM 23.1.2 give for each form, not measurements: latency / reciprocal throughput in cycles, the ports under them. A row is a model, or models that agree; a dash, a form that its processors lack. Memory forms: latency from the address, ports without the load and store units. Which processors each model covers.
Modelzmm {k}{z}, zmm, zmm, imm8no maskzmm {k}{z}, zmm, zmm, imm8with a mask, zeroingzmm {k}{z}, zmm, m512/m32bcst, imm8xmm {k}{z}, xmm, xmm, imm8no maskxmm {k}{z}, xmm, xmm, imm8with a mask, zeroingxmm {k}{z}, xmm, m128/m32bcst, imm8ymm {k}{z}, ymm, ymm, imm8no maskymm {k}{z}, ymm, ymm, imm8with a mask, zeroingymm {k}{z}, ymm, m256/m32bcst, imm8
Skylake-SP, Ice Lake3 / 1p53 / 1p510 / 1p53 / 1p53 / 1p59 / 1p53 / 1p53 / 1p510 / 1p5
Sapphire Rapids3 / 1p53 / 1p511 / 1p51 / 1p51 / 1p58 / 1p53 / 1p53 / 1p511 / 1p5
Zen 42 / 0.51FP1 FP21 / 11FP1 FP28 / 1FP1 FP23 / 0.52FP1 FP21 / 0.52FP1 FP28 / 0.5FP1 FP24 / 13FP1 FP21 / 0.54FP1 FP28 / 0.5FP1 FP2
  1. Zen 4 model: AMD's spreadsheets give latency 5 for Zen 4 and Zen 5 (AMD 57647, row 861; AMD 58455, row 378).
  2. Zen 4 model: AMD's spreadsheets give latency 2 for Zen 4 and Zen 5 (AMD 57647, row 859; AMD 58455, row 376).
  3. Zen 4 model: AMD's spreadsheets give reciprocal throughput 0.5 for Zen 4 and Zen 5 (AMD 57647, row 860; AMD 58455, row 377).
  4. Zen 4 model: AMD's spreadsheets give latency 4 for Zen 4 and Zen 5 (AMD 57647, row 860; AMD 58455, row 377).

Data flow

Where the elements of the sources go, element 0 on the right; results that depend on a control value are drawn for an example. How to read.

Align: zmm2 above zmm3 make one 32-doubleword value, shifted right by imm8 doublewords; the low 16 are the result.
VALIGND with imm8 = 5With imm8 = 5, result doublewords 15 to 0: a4, unchanged (bit 14 of k1 is 0), a2, a1, a0, b15, b14, b13, b12, b11, b10, b9, b8, b7, b6, b5.0123456789101112131415zmm2a1111111111111110k1b5b6b7b8b9b10b11b12b13b14b15a0a1a2a4zmm10123456789101112131415zmm3or m512b

Example: imm8 = 5. Shown for the zmm form; the xmm and ymm forms work the same on 4 and 8 doublewords. The forms write under a mask: where its bit is 0, the element keeps its old value, or zeroes it with {z}. With m32bcst, one doubleword from memory stands for every element of zmm3.

With imm8 = 5, result doublewords 15 to 0: a4, unchanged (bit 14 of k1 is 0), a2, a1, a0, b15, b14, b13, b12, b11, b10, b9, b8, b7, b6, b5.

Operation

What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.

n = VL // 32                # 4 in xmm, 8 in ymm, 16 in zmm
for i in range(n):
    j = i + (imm8 & n - 1)  # element j of zmm2:src3
    if k1[i]:
        if j < n:
            zmm1.d[i] = src3.d[j]
        else:
            zmm1.d[i] = zmm2.d[j - n]
    elif zeroing:
        zmm1.d[i] = 0
    # else: zmm1.d[i] keeps its value
# m32bcst: src3.d[i] is the m32 for every i
# zmm1 is zeroed from bit VL up

Run on AMD Zen 5 (EPYC 9645): 6 cases.

Operands

What each form reads and writes, as Intel XED records it: the operands of its syntax, in order, and the implicit ones that the syntax does not name. How to read.
OperandKindAction
VALIGND xmm {k}{z}, xmm, xmm/m128/m32bcst, imm8 VALIGND ymm {k}{z}, ymm, ymm/m256/m32bcst, imm8 VALIGND zmm {k}{z}, zmm, zmm/m512/m32bcst, imm8
xmm, ymm, zmmexplicitwrite (masked)
{k}explicitread (write mask)
xmm, ymm, zmmexplicitread
xmm/m128/m32bcst, ymm/m256/m32bcst, zmm/m512/m32bcstexplicitread
imm8explicitread

Flags

None: XED records no flag that the forms test or change.

Exceptions

The exception class is XED's name for the set of exception conditions that a form follows. How to read.

All forms
AVX512-E4NF

Attributes

What else XED records about the forms. How to read.

All forms
write masking
Memory forms
embedded broadcast (tuple Full)

Intrinsics

The C intrinsics of Clang 23.1.2 that compile to VALIGND, each with the form it compiles to and the Clang options it needs. The forms come from compiling every intrinsic and decoding the result with Intel XED; all intrinsics A–Z explains the method.

IntrinsicCompiles to
_mm_mask_alignr_epi32 __m128i _mm_mask_alignr_epi32(__m128i W, __mmask8 U, __m128i A, __m128i B, const int imm)

VALIGND xmm {k}, xmm, xmm, imm8 EVEX.128 -mavx512vl

_mm_maskz_alignr_epi32 __m128i _mm_maskz_alignr_epi32(__mmask8 U, __m128i A, __m128i B, const int imm)

VALIGND xmm {k}{z}, xmm, xmm, imm8 EVEX.128 -mavx512vl

_mm256_alignr_epi32 __m256i _mm256_alignr_epi32(__m256i A, __m256i B, const int imm)

VALIGND ymm, ymm, ymm, imm8 EVEX.256 -mavx512vlClang emits the equivalent VALIGNQ

_mm256_mask_alignr_epi32 __m256i _mm256_mask_alignr_epi32(__m256i W, __mmask8 U, __m256i A, __m256i B, const int imm)

VALIGND ymm {k}, ymm, ymm, imm8 EVEX.256 -mavx512vl

_mm256_maskz_alignr_epi32 __m256i _mm256_maskz_alignr_epi32(__mmask8 U, __m256i A, __m256i B, const int imm)

VALIGND ymm {k}{z}, ymm, ymm, imm8 EVEX.256 -mavx512vl

_mm512_alignr_epi32 __m512i _mm512_alignr_epi32(__m512i A, __m512i B, const int I)

VALIGND zmm, zmm, zmm, imm8 EVEX.512 -mavx512fClang emits the equivalent VALIGNQ

_mm512_mask_alignr_epi32 __m512i _mm512_mask_alignr_epi32(__m512i W, __mmask16 U, __m512i A, __m512i B, const int imm)

VALIGND zmm {k}, zmm, zmm, imm8 EVEX.512 -mavx512f

_mm512_maskz_alignr_epi32 __m512i _mm512_maskz_alignr_epi32(__mmask16 U, __m512i A, __m512i B, const int imm)

VALIGND zmm {k}{z}, zmm, zmm, imm8 EVEX.512 -mavx512f

CPUID and processors

Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.

CPUID requirements and processors of the XED ISA sets above. Alternatives are separated by “or”; processors follow XED’s chip model, whose AMD processors end with Zen 2, and the CPU data of this site for Zen 3 to Zen 6.
ISA setCPUIDProcessors
AVX512F_512

AVX10.1
CPUID.(EAX=07H,ECX=1):EDX[19] AVX10
CPUID.(EAX=24H,ECX=0):EBX[7:0] ≥ 1 AVX10 version

or

AVX512F
CPUID.(EAX=07H,ECX=0):EBX[16] AVX512F

Cannon Lake, Ice Lake (client), Tiger Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Knights Landing, Knights Mill, Zen 4, Zen 5, Zen 6
AVX512F_128

AVX10.1
CPUID.(EAX=07H,ECX=1):EDX[19] AVX10
CPUID.(EAX=24H,ECX=0):EBX[7:0] ≥ 1 AVX10 version

or

AVX512F + AVX512VL
CPUID.(EAX=07H,ECX=0):EBX[16] AVX512F
CPUID.(EAX=07H,ECX=0):EBX[31] AVX512VL

Cannon Lake, Ice Lake (client), Tiger Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Zen 4, Zen 5, Zen 6
AVX512F_256
Same as AVX512F_128Same as AVX512F_128

More AVX10.1 instructions

All 686 AVX10.1 instructions

Sources

  1. Intel XED v2026.08.23 (commit 0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model.
  2. The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s -march feature sets and AMD’s Processor Programming References, which the page of each processor cites.
  3. Clang's x86 intrinsic headers, LLVM 23.1.2 (commit 85ac56026243): the intrinsics, their signatures and doc comments, and the Clang of that release, which compiled each of them.
  4. LLVM 23.1.2's x86 scheduling models (commit 85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them.
  5. Intel Advanced Vector Extensions 10.2 Architecture Specification, revision 7.0 (361050-007, April 2026)
  6. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2C, page 5-4 (VALIGND/VALIGNQ)
  7. Software Optimization Guide for the AMD Zen5 Microarchitecture (58455, rev. 1.00, August 2024), Wayback Machine copy of AMD's ZIP

The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The intrinsics and their signatures come from Clang and the timings from LLVM's scheduling models, both part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.