Instruction
VMOVSLDUP
Duplicates each even-numbered single into the odd position above it.
VMOVSLDUP is the VEX and EVEX form of MOVSLDUP: each even single is copied over the odd one above it, giving elements 0, 0, 2, 2 and so on. VMOVSHDUP describes what the new encodings bring to both: ymm forms with AVX, zmm forms and a write mask per single with AVX-512F or AVX10.1, no broadcast, memory at any alignment, the register cleared above the vector length, and pairs that never cross a lane.
Recorded on Zen 5
{evex} vmovsldup ymm24, ymmword ptr [mem]gave singles 0, 0, 2, 2, 4, 4, 6, 6 of the 32 bytes, into a register only EVEX can name.vmovsldup ymm9{k5}{z}, ymm9, with the low byte of K5 E1h, read and wrote YMM9: element 0 was rewritten with itself, elements 5, 6 and 7 became elements 4, 6 and 6 of the old YMM9, and the other four were zeroed.vmovsldup xmm17{k2}{z}, xmmword ptr [mem], the low bits of K2 1001b, wrote the first single from memory to element 0 and the third to element 3, and zeroed elements 1 and 2.
The real parts of complex floats
MOVSLDUP’s page shows GCC 14 spreading the real parts of a
float complex product with MOVSLDUP. In our builds at -O2 with
-march=x86-64-v3 -fcx-limited-range, GCC does the same work on eight
singles with vpermilps ymm1, ymm0, 0xa0 instead, F5h for the
imaginary parts and B1h to swap the parts of the other factor, and
combines them with VMULPS and VFMADDSUB231PS;
-v4 does the same on zmm registers. Multiplying by a real part only,
GCC folds the load into vpermilps ymm0, ymmword ptr [...], 0xa0.
Clang 23 separates real and imaginary parts with VSHUFPS and VPERMPD
(VPERMT2PS at -v4) instead, and keeps VMOVSLDUP for the plain shuffle
__builtin_shufflevector(v, v, 0, 0, 2, 2, 4, 4, 6, 6), which GCC
spells vpermilps ymm0, ymm0, 0xa0.
AMD’s latency spreadsheet for Zen 5 gives VMOVSLDUP the figures of VMOVSHDUP in both rows: one macro-op, 1 cycle, four per cycle.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
VMOVSLDUP xmm, m128
VMOVSLDUP_XMMdq_MEMdq | VEX.128.F3.0F.WIG 12 /r | AVX |
VMOVSLDUP xmm, xmm
VMOVSLDUP_XMMdq_XMMdq | VEX.128.F3.0F.WIG 12 /r | AVX |
VMOVSLDUP ymm, m256
VMOVSLDUP_YMMqq_MEMqq | VEX.256.F3.0F.WIG 12 /r | AVX |
VMOVSLDUP ymm, ymm
VMOVSLDUP_YMMqq_YMMqq | VEX.256.F3.0F.WIG 12 /r | AVX |
VMOVSLDUP zmm {k}{z}, zmm
VMOVSLDUP_ZMMf32_MASKmskw_ZMMf32_AVX512 | EVEX.512.F3.0F.W0 12 /r | AVX10.1 or AVX512F |
VMOVSLDUP zmm {k}{z}, m512
VMOVSLDUP_ZMMf32_MASKmskw_MEMf32_AVX512 | EVEX.512.F3.0F.W0 12 /r | AVX10.1 or AVX512F |
VMOVSLDUP xmm {k}{z}, xmm
VMOVSLDUP_XMMf32_MASKmskw_XMMf32_AVX512 | EVEX.128.F3.0F.W0 12 /r | AVX10.1 or AVX512F + AVX512VL |
VMOVSLDUP xmm {k}{z}, m128
VMOVSLDUP_XMMf32_MASKmskw_MEMf32_AVX512 | EVEX.128.F3.0F.W0 12 /r | AVX10.1 or AVX512F + AVX512VL |
VMOVSLDUP ymm {k}{z}, ymm
VMOVSLDUP_YMMf32_MASKmskw_YMMf32_AVX512 | EVEX.256.F3.0F.W0 12 /r | AVX10.1 or AVX512F + AVX512VL |
VMOVSLDUP ymm {k}{z}, m256
VMOVSLDUP_YMMf32_MASKmskw_MEMf32_AVX512 | EVEX.256.F3.0F.W0 12 /r | AVX10.1 or AVX512F + AVX512VL |
Latency and throughput
| Model | xmm, m128 | xmm, xmmxmm {k}{z}, xmmymm {k}{z}, ymm | ymm, m256 | ymm, ymm | zmm {k}{z}, zmm | zmm {k}{z}, m512no mask | zmm {k}{z}, m512with a mask, zeroing | xmm {k}{z}, m128no mask | xmm {k}{z}, m128with 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 | 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 |
| Ice Lake | 6 / 0.5p23 | 1 / 0.5p15 | 7 / 0.5p23 | 1 / 0.5p15 | 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 / 0.5p15 | 8 / 0.33p2 p3 p10 | 1 / 0.5p15 | |||||||
| Sapphire Rapids | 7 / 0.33p2 p3 p10 | 1 / 0.5p15 | 8 / 0.33p2 p3 p10 | 1 / 0.5p15 | 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 | 1 / 1FP1 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 singles 3 to 0: a2, unchanged (bit 2 of k1 is 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 // 32):
j = i - i % 2
if k1[i]: # 1 without a write mask
zmm1.d[i] = src2.d[j]
elif zeroing:
zmm1.d[i] = 0
# else: zmm1.d[i] keeps its value
# zmm1 is zeroed from bit VL upRun on AMD Zen 5 (EPYC 9645): 10 cases.
Operands
| Operand | Kind | Action |
|---|---|---|
VMOVSLDUP xmm, xmm/m128 VMOVSLDUP ymm, ymm/m256 | ||
xmm, ymm | explicit | write |
xmm/m128, ymm/m256 | explicit | read |
VMOVSLDUP xmm {k}{z}, xmm/m128 VMOVSLDUP ymm {k}{z}, ymm/m256 VMOVSLDUP zmm {k}{z}, zmm/m512 | ||
xmm, ymm, zmm | explicit | write (masked) |
{k} | explicit | read (write mask) |
xmm/m128, 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-4- EVEX forms
AVX512-E4NF
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 VMOVSLDUP, 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_moveldup_ps
__m128 _mm_moveldup_ps(__m128 __a) |
|
_mm_mask_moveldup_ps
__m128 _mm_mask_moveldup_ps(__m128 __W, __mmask8 __U, __m128 __A) |
|
_mm_maskz_moveldup_ps
__m128 _mm_maskz_moveldup_ps(__mmask8 __U, __m128 __A) |
|
_mm256_moveldup_ps
__m256 _mm256_moveldup_ps(__m256 __a) |
|
_mm256_mask_moveldup_ps
__m256 _mm256_mask_moveldup_ps(__m256 __W, __mmask8 __U, __m256 __A) |
|
_mm256_maskz_moveldup_ps
__m256 _mm256_maskz_moveldup_ps(__mmask8 __U, __m256 __A) |
|
_mm512_moveldup_ps
__m512 _mm512_moveldup_ps(__m512 __A) |
|
_mm512_mask_moveldup_ps
__m512 _mm512_mask_moveldup_ps(__m512 __W, __mmask16 __U, __m512 __A) |
|
_mm512_maskz_moveldup_ps
__m512 _mm512_maskz_moveldup_ps(__mmask16 __U, __m512 __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
- VMOVAPS
- VMOVD
- VMOVDDUP
- VMOVDQA
- VMOVDQU
- VMOVHLPS
- VMOVHPD
- VMOVHPS
- VMOVLHPS
- VMOVLPD
- VMOVLPS
- VMOVMSKPD
- VMOVMSKPS
- VMOVNTDQ
- VMOVNTDQA
- VMOVNTPD
- VMOVNTPS
- VMOVQ
- VMOVSD
- VMOVSHDUP
- VMOVSS
- VMOVUPD
- VMOVUPS
- VMPSADBW
- VMULPD
- VMULPS
- VMULSD
- VMULSS
- VORPD
- VORPS
- VPABSB
- VPABSD
- VPABSW
- VPACKSSDW
- VPACKSSWB
- VPACKUSDW
- VPACKUSWB
- VPADDB
- VPADDD
- VPADDQ
More AVX10.1 instructions
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-114 (MOVSLDUP)
- 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.