Extensions
Forms
10 (2 VEX, 8 EVEX)
Data
Intel XED v2026.08.23

VPERMPD rearranges the doubles of a vector across its 128-bit lanes. It is the double-precision twin of VPERMQ, whose page covers the two forms, the common immediates and how Clang picks between the two; the data are only moved, so no floating-point exception or MXCSR flag is possible. There is no 128-bit form: within one xmm register, VPERMILPD does the job.

In code on doubles

GCC 14 and Clang 23 at -O2 with -march=x86-64-v3 use the immediate form whenever four doubles of a ymm register are rearranged:

  • copying an array of doubles backwards is VPERMPD with 0x1B (27), reading straight from memory;
  • repeating element 2 of a vector everywhere is 0xAA (170), and rotating the four elements by one is 0x39 (57).

Eight doubles in a zmm register are another matter, because the immediate form of 512 bits rearranges each 256-bit half on its own. For reversing a zmm vector, both compilers with -march=x86-64-v4 load an index vector and use the form that takes it from a register; for the reversed copy, GCC does the same on zmm registers and Clang keeps four immediate VPERMPD on ymm ones.

On Zen 5

The cases recorded on Zen 5 show both points:

  • vpermpd zmm24{k7}, zmm3, 0xA6 took elements 2, 1, 2 and 2 of each half of zmm3 for that half, in the elements that k7 selected.
  • vpermpd zmm24{k7}, zmm3, zmm3, with the same register as indices and table, used only the low three bits of each double’s bit pattern as its index: both low elements ended in 7 and became element 7.

AMD’s Zen 5 guide gives VPERMPD the figures of VPERMQ: a latency of 4 cycles, except for the index form on zmm registers, at 5.

In the optimization guide

What the optimization guide says about VPERMPD, a line per claim. Each links to the claim in the guide, with its sources and where they differ.

Crestmont and Gracemont

Golden Cove and Raptor Cove

Zen 2

  • Vectors and floating point: AMD’s spreadsheet makes the AVX2 permutes that cross the 128-bit lanes, VPERMD, vpermps, vpermq and vpermpd, microcoded, while vperm2f128 is one macro-op of three cycles on pipe 2. sources differ

Forms

Every encoding of VPERMPD that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
VPERMPD ymm, m256, imm8 VPERMPD_YMMqq_MEMqq_IMMbVEX.256.66.0F3A.W1 01 /r ibAVX2
VPERMPD ymm, ymm, imm8 VPERMPD_YMMqq_YMMqq_IMMbVEX.256.66.0F3A.W1 01 /r ibAVX2
VPERMPD zmm {k}{z}, zmm, imm8 VPERMPD_ZMMf64_MASKmskw_ZMMf64_IMM8_AVX512EVEX.512.66.0F3A.W1 01 /r ibAVX10.1 or AVX512F
VPERMPD zmm {k}{z}, m512/m64bcst, imm8 VPERMPD_ZMMf64_MASKmskw_MEMf64_IMM8_AVX512EVEX.512.66.0F3A.W1 01 /r ibAVX10.1 or AVX512F
VPERMPD zmm {k}{z}, zmm, zmm VPERMPD_ZMMf64_MASKmskw_ZMMf64_ZMMf64_AVX512EVEX.512.66.0F38.W1 16 /rAVX10.1 or AVX512F
VPERMPD zmm {k}{z}, zmm, m512/m64bcst VPERMPD_ZMMf64_MASKmskw_ZMMf64_MEMf64_AVX512EVEX.512.66.0F38.W1 16 /rAVX10.1 or AVX512F
VPERMPD ymm {k}{z}, ymm, imm8 VPERMPD_YMMf64_MASKmskw_YMMf64_IMM8_AVX512EVEX.256.66.0F3A.W1 01 /r ibAVX10.1 or AVX512F + AVX512VL
VPERMPD ymm {k}{z}, m256/m64bcst, imm8 VPERMPD_YMMf64_MASKmskw_MEMf64_IMM8_AVX512EVEX.256.66.0F3A.W1 01 /r ibAVX10.1 or AVX512F + AVX512VL
VPERMPD ymm {k}{z}, ymm, ymm VPERMPD_YMMf64_MASKmskw_YMMf64_YMMf64_AVX512EVEX.256.66.0F38.W1 16 /rAVX10.1 or AVX512F + AVX512VL
VPERMPD ymm {k}{z}, ymm, m256/m64bcst VPERMPD_YMMf64_MASKmskw_YMMf64_MEMf64_AVX512EVEX.256.66.0F38.W1 16 /rAVX10.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.
Modelymm, m256, imm8ymm, ymm, imm8zmm {k}{z}, zmm, imm8
ymm {k}{z}, ymm, imm8
zmm {k}{z}, m512/m64bcst, imm8
ymm {k}{z}, m256/m64bcst, imm8
zmm {k}{z}, zmm, zmmzmm {k}{z}, zmm, m512/m64bcst
ymm {k}{z}, ymm, m256/m64bcst
ymm {k}{z}, ymm, ymm
Haswell, Skylake10 / 1p53 / 1p5
Broadwell9 / 1p53 / 1p5
Skylake-SP, Ice Lake10 / 1p53 / 1p53 / 1p510 / 1p53 / 1p510 / 1p53 / 1p5
Alder Lake11 / 1p53 / 1p5
Sapphire Rapids11 / 1p53 / 1p53 / 1p511 / 1p53 / 1p511 / 1p53 / 1p5
Lunar Lake11 / 0.5V2 V33 / 0.5V2 V3
Zen9 / 1FPU1 FPU22 / 1FPU1 FPU2
Zen 29 / 0.5FPU1 FPU22 / 0.5FPU1 FPU2
Zen 313 / 2FP16 / 1FP1
Zen 411 / 1FP14 / 1FP12 / 11FP19 / 1FP15 / 1FP1 FP214 / 1FP14 / 12FP1 FP2
  1. Zen 4 model: AMD's spreadsheets give latency 4 for Zen 4 and Zen 5 (AMD 57647, row 2283; AMD 58455, row 565).
  2. Zen 4 model: AMD's spreadsheets give reciprocal throughput 0.5 for Zen 4 and Zen 5 (AMD 57647, row 2281; AMD 58455, row 615).

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.

Shuffle by immediate: two bits of imm8 per result double pick one of the four doubles, across lanes.VPERMPD ymm, ymm/m256, imm8 VPERMPD ymm {k}{z}, ymm/m256/m64bcst, imm8 VPERMPD zmm {k}{z}, zmm/m512/m64bcst, imm8
VPERMPD with imm8 = 0x1EWith imm8 = 0x1E, result doubles 3 to 0: a0, unchanged (bit 2 of k1 is 0), a3, a2.0123ymm2or m256a1110k1a2a3a0ymm110110100imm80x1E

Example: imm8 = 0x1E (0001 1110 in binary). The zmm form does this in each 256-bit half. The EVEX forms write under a mask: where its bit is 0, the element keeps its old value, or zeroes it with {z}. With m64bcst, one double from memory stands for every element of ymm2.

With imm8 = 0x1E, result doubles 3 to 0: a0, unchanged (bit 2 of k1 is 0), a3, a2.

Permute by index: each double of the result is the double of the table zmm3 that the index in the same place of zmm2 numbers, across the whole register.VPERMPD ymm {k}{z}, ymm, ymm/m256/m64bcst VPERMPD zmm {k}{z}, zmm, zmm/m512/m64bcst
VPERMPD with an example index vectorWith the example indices, result doubles 7 to 0: b1, unchanged (bit 6 of k1 is 0), b3, b3, b0, b7, b2, b5.01235674zmm3or m512b11111110b5b2b7b0b3b3b1zmm152703361zmm2index

Example index vector in zmm2 (element 0 on the right); only its low 3 bits count. Shown for the zmm form; the ymm form works the same on 4 doubles. The forms write under a mask: where its bit is 0, the element keeps its old value, or zeroes it with {z}.

With the example indices, result doubles 7 to 0: b1, unchanged (bit 6 of k1 is 0), b3, b3, b0, b7, b2, b5.

Operation

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

VPERMPD ymm, ymm/m256, imm8 VPERMPD ymm {k}{z}, ymm/m256/m64bcst, imm8 VPERMPD zmm {k}{z}, zmm/m512/m64bcst, imm8
for i in range(VL // 64):
    k = imm8 >> 2 * (i % 4) & 3
    j = i - i % 4 + k
    if k1[i]:  # 1 without a write mask
        zmm1.q[i] = src2.q[j]
    elif zeroing:
        zmm1.q[i] = 0
    # else: zmm1.q[i] keeps its value
# m64bcst: src2.f64[i] is the m64 for every i
# zmm1 is zeroed from bit VL up

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

VPERMPD ymm {k}{z}, ymm, ymm/m256/m64bcst VPERMPD zmm {k}{z}, zmm, zmm/m512/m64bcst
n = VL // 64  # 4 in ymm, 8 in zmm
for i in range(n):
    if k1[i]:
        zmm1.q[i] = src3.q[zmm2.q[i] % n]
    elif zeroing:
        zmm1.q[i] = 0
    # else: zmm1.q[i] keeps its value
# m64bcst: src3.f64[i] is the m64 for every i
# zmm1 is zeroed from bit VL up

Run on AMD Zen 5 (EPYC 9645): 4 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
VPERMPD ymm, ymm/m256, imm8
ymmexplicitwrite
ymm/m256explicitread
imm8explicitread
VPERMPD ymm {k}{z}, ymm/m256/m64bcst, imm8 VPERMPD zmm {k}{z}, zmm/m512/m64bcst, imm8
ymm, zmmexplicitwrite (masked)
{k}explicitread (write mask)
ymm/m256/m64bcst, zmm/m512/m64bcstexplicitread
imm8explicitread
VPERMPD ymm {k}{z}, ymm, ymm/m256/m64bcst VPERMPD zmm {k}{z}, zmm, zmm/m512/m64bcst
ymm, zmmexplicitwrite (masked)
{k}explicitread (write mask)
ymm, zmmexplicitread
ymm/m256/m64bcst, zmm/m512/m64bcstexplicitread

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.

VEX forms
avx-type-4
EVEX forms
AVX512-E4NF

Attributes

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

EVEX forms
write masking
EVEX memory forms
embedded broadcast (tuple Full)

Intrinsics

The C intrinsics of Clang 23.1.2 that compile to VPERMPD, 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
_mm256_permute4x64_pd __m256d _mm256_permute4x64_pd(__m256d V, const int M)

VPERMPD ymm, ymm, imm8 VEX.256 -mavx2

_mm256_permutex_pd __m256d _mm256_permutex_pd(__m256d X, const int C)

VPERMPD ymm, ymm, imm8 VEX.256 -mavx512vl

_mm256_permutexvar_pd __m256d _mm256_permutexvar_pd(__m256i __X, __m256d __Y)

VPERMPD ymm, ymm, ymm EVEX.256 -mavx512vl

_mm256_mask_permutex_pd __m256d _mm256_mask_permutex_pd(__m256d W, __mmask8 U, __m256d X, const int C)

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

_mm256_mask_permutexvar_pd __m256d _mm256_mask_permutexvar_pd(__m256d __W, __mmask8 __U, __m256i __X, __m256d __Y)

VPERMPD ymm {k}, ymm, ymm EVEX.256 -mavx512vl

_mm256_maskz_permutex_pd __m256d _mm256_maskz_permutex_pd(__mmask8 U, __m256d X, const int C)

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

_mm256_maskz_permutexvar_pd __m256d _mm256_maskz_permutexvar_pd(__mmask8 __U, __m256i __X, __m256d __Y)

VPERMPD ymm {k}{z}, ymm, ymm EVEX.256 -mavx512vl

_mm512_permutex_pd __m512d _mm512_permutex_pd(__m512d X, const int C)

VPERMPD zmm, zmm, imm8 EVEX.512 -mavx512f

_mm512_permutexvar_pd __m512d _mm512_permutexvar_pd(__m512i __X, __m512d __Y)

VPERMPD zmm, zmm, zmm EVEX.512 -mavx512f

_mm512_mask_permutex_pd __m512d _mm512_mask_permutex_pd(__m512d W, __mmask8 U, __m512d X, const int C)

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

_mm512_mask_permutexvar_pd __m512d _mm512_mask_permutexvar_pd(__m512d __W, __mmask8 __U, __m512i __X, __m512d __Y)

VPERMPD zmm {k}, zmm, zmm EVEX.512 -mavx512f

_mm512_maskz_permutex_pd __m512d _mm512_maskz_permutex_pd(__mmask8 U, __m512d X, const int C)

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

_mm512_maskz_permutexvar_pd __m512d _mm512_maskz_permutexvar_pd(__mmask8 __U, __m512i __X, __m512d __Y)

VPERMPD zmm {k}{z}, zmm, zmm 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
AVX2

AVX2
CPUID.(EAX=07H,ECX=0):EBX[5] AVX2

Haswell, Broadwell, Skylake, Comet Lake, Cannon Lake, Ice Lake (client), Tiger Lake, Alder Lake, Arrow Lake, Panther Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Sierra Forest, Clearwater Forest, Knights Landing, Knights Mill, Zen, Zen+, Zen 2, Zen 3, Zen 4, Zen 5, Zen 6
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_256

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

More AVX2 instructions

All 138 AVX2 instructions

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 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2C, page 5-522 (VPERMPD)
  6. Intel Advanced Vector Extensions 10.2 Architecture Specification, revision 7.0 (361050-007, April 2026)
  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.