Instruction
VMOVDDUP
Duplicates each even-numbered double into the next odd position.
VMOVDDUP is the VEX and EVEX form of MOVDDUP, whose page covers the 128-bit broadcast of a double and its place in SSE3. The 128-bit forms still copy the low double, or eight bytes of memory at any alignment, into both halves, and zero the register above. The wider forms do it in each 128-bit lane: a ymm result holds doubles 0, 0, 2, 2 of the source, and its memory operand is 32 bytes, though doubles 1 and 3 are not used. VEX.128 and VEX.256 need AVX; the EVEX forms need AVX512F (with AVX512VL below 512 bits) or AVX10.1, and add a write mask per double but no broadcast. To fill a whole ymm register with one double, VBROADCASTSD is the instruction.
On Zen 5, vmovddup ymm12, ymmword ptr [mem] gave the doubles at
offsets 0 and 16 twice each. With masks:
vmovddup xmm0{k5}{z}, qword ptr [mem], with bit 1 of K5 clear, kept
the memory double in element 0 only and zeroed element 1, and
vmovddup zmm0{k4}, zmm31 wrote elements 0, 2, 5, 6 and 7, each from
the even double of its lane, and kept elements 1, 3 and 4 of ZMM0.
In compiled code
In our builds at -O2 with -march=x86-64-v3 and x86-64-v4, GCC 14
and Clang 23 compile _mm_set1_pd(*p) and _mm_loaddup_pd(p) to
vmovddup xmm0, qword ptr [rdi], and _mm256_set1_pd to VBROADCASTSD.
For _mm_movedup_pd(v) Clang emits VMOVDDUP and GCC
vpermilpd xmm0, xmm0, 0. For _mm256_movedup_pd(v) and
_mm512_movedup_pd(v) on a register, Clang emits vmovddup ymm0, ymm0 and its zmm twin, while GCC stores the register to the stack and
runs VMOVDDUP on the copy in memory; from memory, both load and
duplicate in one VMOVDDUP.
AMD’s latency spreadsheet for Zen 5 gives the VEX forms one macro-op on pipes FP0 to FP3, a latency of 1 cycle and four per cycle, and the EVEX forms one macro-op on FP1 or FP2, a latency of 2 cycles and two per cycle.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
VMOVDDUP xmm, m64
VMOVDDUP_XMMdq_MEMq | VEX.128.F2.0F.WIG 12 /r | AVX |
VMOVDDUP xmm, xmm
VMOVDDUP_XMMdq_XMMq | VEX.128.F2.0F.WIG 12 /r | AVX |
VMOVDDUP ymm, m256
VMOVDDUP_YMMqq_MEMqq | VEX.256.F2.0F.WIG 12 /r | AVX |
VMOVDDUP ymm, ymm
VMOVDDUP_YMMqq_YMMqq | VEX.256.F2.0F.WIG 12 /r | AVX |
VMOVDDUP zmm {k}{z}, zmm
VMOVDDUP_ZMMf64_MASKmskw_ZMMf64_AVX512 | EVEX.512.F2.0F.W1 12 /r | AVX10.1 or AVX512F |
VMOVDDUP zmm {k}{z}, m512
VMOVDDUP_ZMMf64_MASKmskw_MEMf64_AVX512 | EVEX.512.F2.0F.W1 12 /r | AVX10.1 or AVX512F |
VMOVDDUP xmm {k}{z}, xmm
VMOVDDUP_XMMf64_MASKmskw_XMMf64_AVX512 | EVEX.128.F2.0F.W1 12 /r | AVX10.1 or AVX512F + AVX512VL |
VMOVDDUP xmm {k}{z}, m64
VMOVDDUP_XMMf64_MASKmskw_MEMf64_AVX512 | EVEX.128.F2.0F.W1 12 /r | AVX10.1 or AVX512F + AVX512VL |
VMOVDDUP ymm {k}{z}, ymm
VMOVDDUP_YMMf64_MASKmskw_YMMf64_AVX512 | EVEX.256.F2.0F.W1 12 /r | AVX10.1 or AVX512F + AVX512VL |
VMOVDDUP ymm {k}{z}, m256
VMOVDDUP_YMMf64_MASKmskw_MEMf64_AVX512 | EVEX.256.F2.0F.W1 12 /r | AVX10.1 or AVX512F + AVX512VL |
Latency and throughput
| Model | xmm, m64 | xmm, xmm | ymm, m256 | ymm, ymm | zmm {k}{z}, zmmxmm {k}{z}, xmmymm {k}{z}, ymm | zmm {k}{z}, m512no mask | zmm {k}{z}, m512with a mask, zeroing | xmm {k}{z}, m64no mask | xmm {k}{z}, m64with a mask, zeroing | ymm {k}{z}, m256no mask | ymm {k}{z}, m256with a mask, zeroing |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Sandy Bridge, Haswell, Skylake | 6 / 0.5p23 | 1 / 1p5 | 7 / 0.5p23 | 1 / 1p5 | |||||||
| Broadwell | 5 / 0.5p23 | 1 / 1p5 | 6 / 0.5p23 | 1 / 1p5 | |||||||
| Skylake-SP, Ice Lake | 6 / 0.5p23 | 1 / 1p5 | 7 / 0.5p23 | 1 / 1p5 | 1 / 1p5 | 8 / 0.5p015 | 8 / 0.5p015 | 7 / 0.5p015 | 7 / 0.5p015 | 8 / 0.5p015 | 8 / 0.5p015 |
| Alder Lake | 7 / 0.33p2 p3 p10 | 1 / 1p5 | 8 / 0.33p2 p3 p10 | 1 / 1p5 | |||||||
| Sapphire Rapids | 7 / 0.33p2 p3 p10 | 1 / 1p5 | 8 / 0.33p2 p3 p10 | 1 / 1p5 | 1 / 1p5 | 8 / 0.33p2 p3 p10 | 9 / 0.5p05 | 7 / 0.33p2 p3 p10 | 8 / 0.33p015 | 8 / 0.33p2 p3 p10 | 9 / 0.33p015 |
| Lunar Lake | 6 / 2p20 p21 p22 | 1 / 0.5V2 V3 | 7 / 2.33p20 p21 p22 | 1 / 0.5V2 V3 | |||||||
| Piledriver | 7 / 1.5FPFMA FPU0 FPU1 | 2 / 1FPFMA FPU0 FPU1 | 7 / 2FPFMA FPU0 FPU1 | 2 / 2FPFMA FPU0 FPU1 | |||||||
| Zen | 8 / 0.5FPU1 FPU2 | 1 / 0.5FPU1 FPU2 | 8 / 1FPU1 FPU2 | 1 / 1FPU1 FPU2 | |||||||
| Zen 2 | 8 / 0.5FPU1 FPU2 | 1 / 0.5FPU1 FPU2 | 8 / 0.5FPU1 FPU2 | 1 / 0.5FPU1 FPU2 | |||||||
| Zen 3 | 8 / 0.5FP1 FP2 | 1 / 0.5FP1 FP2 | 8 / 0.5FP1 FP2 | 1 / 0.5FP1 FP2 | |||||||
| Zen 4 | 8 / 0.5FP1 FP2 | 1 / 0.5FP1 FP2 | 8 / 0.5FP1 FP2 | 1 / 0.5FP1 FP2 | 2 / 11FP1 FP2 | 8 / 1FP1 FP2 | 8 / 1FP1 FP2 | 8 / 0.5FP1 FP2 | 8 / 0.5FP1 FP2 | 8 / 0.5FP1 FP2 | 8 / 0.5FP1 FP2 |
| Jaguar | 6 / 1FPA FPM FPU0 FPU1 | 1 / 0.5FPA FPM FPU0 FPU1 | 6 / 2FPA FPM FPU0 FPU1 | 1 / 1FPA FPM FPU0 FPU1 | |||||||
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.
The ymm and zmm forms repeat this in each 128-bit lane. The EVEX forms write under a mask: where its bit is 0, the element keeps its old value, or zeroes it with {z}.
Result doubles 1 to 0: a0, a0.
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
for i in range(VL // 64):
j = i - i % 2
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
# zmm1 is zeroed from bit VL upRun on AMD Zen 5 (EPYC 9645): 10 cases.
Operands
| Operand | Kind | Action |
|---|---|---|
VMOVDDUP xmm, xmm/m64 VMOVDDUP ymm, ymm/m256 | ||
xmm, ymm | explicit | write |
xmm/m64, ymm/m256 | explicit | read |
VMOVDDUP xmm {k}{z}, xmm/m64 VMOVDDUP ymm {k}{z}, ymm/m256 VMOVDDUP zmm {k}{z}, zmm/m512 | ||
xmm, ymm, zmm | explicit | write (masked) |
{k} | explicit | read (write mask) |
xmm/m64, ymm/m256, zmm/m512 | explicit | read |
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-5- EVEX forms
AVX512-E5NF
Attributes
What else XED records about the forms. How to read.
- EVEX forms
- write masking
Intrinsics
The C intrinsics of Clang 23.1.2 that compile to VMOVDDUP, 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.
| Intrinsic | Compiles to |
|---|---|
_mm_broadcastsd_pd
__m128d _mm_broadcastsd_pd(__m128d __a) |
Clang's comment names MOVDDUP, the SSE3 instruction; this AVX2 intrinsic is compiled to its VEX form, VMOVDDUP. |
_mm_load1_pd
__m128d _mm_load1_pd(const double *__dp) |
|
_mm_load_pd1
__m128d _mm_load_pd1(const double *dp) |
|
_mm_loaddup_pd
__m128d _mm_loaddup_pd(const double *dp) |
|
_mm_movedup_pd
__m128d _mm_movedup_pd(__m128d __a) |
|
_mm_set1_pd
__m128d _mm_set1_pd(double __w) |
|
_mm_set_pd1
__m128d _mm_set_pd1(double __w) |
|
_mm_mask_movedup_pd
__m128d _mm_mask_movedup_pd(__m128d __W, __mmask8 __U, __m128d __A) |
|
_mm_maskz_movedup_pd
__m128d _mm_maskz_movedup_pd(__mmask8 __U, __m128d __A) |
|
_mm256_movedup_pd
__m256d _mm256_movedup_pd(__m256d __a) |
|
_mm256_mask_movedup_pd
__m256d _mm256_mask_movedup_pd(__m256d __W, __mmask8 __U, __m256d __A) |
|
_mm256_maskz_movedup_pd
__m256d _mm256_maskz_movedup_pd(__mmask8 __U, __m256d __A) |
|
_mm512_movedup_pd
__m512d _mm512_movedup_pd(__m512d __A) |
|
_mm512_mask_movedup_pd
__m512d _mm512_mask_movedup_pd(__m512d __W, __mmask8 __U, __m512d __A) |
|
_mm512_maskz_movedup_pd
__m512d _mm512_maskz_movedup_pd(__mmask8 __U, __m512d __A) |
|
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.
More AVX instructions
- VHSUBPD
- VHSUBPS
- VINSERTF128
- VINSERTPS
- VLDDQU
- VLDMXCSR
- VMASKMOVDQU
- VMASKMOVPD
- VMASKMOVPS
- VMAXPD
- VMAXPS
- VMAXSD
- VMAXSS
- VMINPD
- VMINPS
- VMINSD
- VMINSS
- VMOVAPD
- VMOVAPS
- VMOVD
- VMOVDQA
- VMOVDQU
- VMOVHLPS
- VMOVHPD
- VMOVHPS
- VMOVLHPS
- VMOVLPD
- VMOVLPS
- VMOVMSKPD
- VMOVMSKPS
- VMOVNTDQ
- VMOVNTDQA
- VMOVNTPD
- VMOVNTPS
- VMOVQ
- VMOVSD
- VMOVSHDUP
- VMOVSLDUP
- VMOVSS
- VMOVUPD
More AVX10.1 instructions
- VINSERTI32X4
- VINSERTI32X8
- VINSERTI64X2
- VINSERTI64X4
- VINSERTPS
- VMAXPD
- VMAXPH
- VMAXPS
- VMAXSD
- VMAXSH
- VMAXSS
- VMINPD
- VMINPH
- VMINPS
- VMINSD
- VMINSH
- VMINSS
- VMOVAPD
- VMOVAPS
- VMOVD
- VMOVDQA32
- VMOVDQA64
- VMOVDQU16
- VMOVDQU32
- VMOVDQU64
- VMOVDQU8
- VMOVHLPS
- VMOVHPD
- VMOVHPS
- VMOVLHPS
- VMOVLPD
- VMOVLPS
- VMOVNTDQ
- VMOVNTDQA
- VMOVNTPD
- VMOVNTPS
- VMOVQ
- VMOVSD
- VMOVSH
- VMOVSHDUP
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model. - The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s
-marchfeature sets and AMD’s Processor Programming References, which the page of each processor cites. - 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. - LLVM 23.1.2's x86 scheduling models (commit
85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them. - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2B, page 4-47 (MOVDDUP)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
- Intel Advanced Vector Extensions 10.2 Architecture Specification, revision 7.0 (361050-007, April 2026)
- 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.