Instruction
MOVDQU
Moves 128 bits of integer data between XMM registers and memory without an alignment requirement.
- Extensions
- Forms
- 4 (4 Legacy)
- Data
- Intel XED v2026.08.23
MOVDQU is the SSE2 load and store of 16 bytes at any address. Code uses
it wherever it cannot prove that a pointer is a multiple of 16: string
and memory functions, byte buffers, and vector loops over arrays that
come from a caller. MOVDQA is the same move for aligned
addresses only. Like MOVDQA, it leaves bits 128 and up of a destination
register unchanged, and compilers often emit MOVUPS in
its place, one byte shorter: at -O2, Clang 23 for both _mm_loadu_si128
and _mm_storeu_si128, and GCC 14 for the store.
The alignment rule of legacy SSE reaches beyond the moves: an instruction such as PADDD or PCMPEQB with a 16-byte memory operand faults on an unaligned address. Compilers therefore fold only loads they know to be aligned into such instructions, and load other data with MOVDQU first. The VEX encodings of AVX drop the rule, so there an unaligned load can be part of the arithmetic instruction. VMOVDQU is the VEX form, with 256 bits; the EVEX forms VMOVDQU8 to VMOVDQU64 add masking.
What costs time is crossing a cache line, not the instruction:
- AMD’s Zen 5 guide states that on aligned data the aligned and unaligned instructions perform the same, and that loads and stores that span a 64-byte boundary run at half the throughput, with more for one that crosses a 4 KiB page.
- Intel’s guide advises aligning the buffers that are stored to rather than those loaded from when only some can be aligned, because a store split across pages costs the most.
Two details differ between the manuals. With alignment checking on (CR0.AM and EFLAGS.AC at CPL 3), Intel’s says that a MOVDQU not aligned to 8 bytes may or may not raise #AC, depending on the processor, and AMD’s that one not aligned to 16 bytes raises it. And on processors with AVX, AMD’s makes any aligned 16-byte access atomic, Intel’s only those of the aligned moves such as MOVDQA, so portable code cannot count on MOVDQU being atomic.
In the optimization guide
What the optimization guide says about MOVDQU, a line per claim. Each links to the claim in the guide, with its sources and where they differ.
Redwood Cove
- Front end: Redwood Cove fuses a load into a register with the operation on that register that follows it.
- Front end: Redwood Cove’s load-and-operate fusion takes only some loads, addresses and operations.
Silvermont to Goldmont Plus
- Out-of-order and in-order execution: Goldmont eliminates register-to-register moves of XMM registers; Silvermont does not. sources differ
- Loads, stores and caches: Unaligned vector loads are one micro-op, but line splits are slow; Intel suggests aligned loads and palignr.
Forms
Latency and throughput
| Model | xmm, m128 | xmm, xmm | m128, xmm |
|---|---|---|---|
| Sandy Bridge | 6 / 0.5p23 | 1 / 0.33p015 | 1 / 1p4 p23 |
| Haswell, Skylake, Skylake-SP | 6 / 0.5p23 | 1 / 0.33p015 | 1 / 1p2347 |
| Broadwell | 5 / 0.5p23 | 1 / 0.33p015 | 1 / 1p2347 |
| Ice Lake | 6 / 0.5p23 | 1 / 0.33p015 | 1 / 0.5p4789 |
| Alder Lake, Sapphire Rapids | 7 / 0.33p2 p3 p10 | 1 / 0 | 12 / 0.5p4789 |
| Lunar Lake | 6 / 0.33p20 p21 p22 | 1 / 0.5V0 V1 V2 V3 | 12 / 0.5p10 p11 p25 p26 p27 |
| Bonnell | 3 / 1.5p1 | 1 / 0.5p01 | 2 / 1p1 |
| Silvermont | 3 / 1MEC | 1 / 0.5FPC0 FPC1 | 1 / 1MEC |
| Piledriver | 5 / 1.5FPMAL FPU0 FPU1 | 1 / 1FPMAL FPU0 FPU1 | 1 / 1.5AGLU01 FPSTO FPU2 FPU3 Store |
| Zen | 8 / 0.5AGU0 AGU1 | 1 / 0.25FPU0 FPU1 FPU2 FPU3 | 1 / 0.5AGU0 AGU1 |
| Zen 2 | 8 / 0.33AGU0 AGU1 AGU2 | 1 / 0.25FPU0 FPU1 FPU2 FPU3 | 1 / 0.33AGU0 AGU1 AGU2 |
| Zen 3, Zen 4 | 8 / 0.5FP45 LSU Load | 0 / 0.17 | 1 / 1FP45 FPSt LSU Store |
| Jaguar | 5 / 1LAGU | 1 / 0.5FPU0 FPU1 VALU0 VALU1 | 1 / 1FPU1 |
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 store forms copy the same way, from the register to memory.
Result doubleword i is doubleword i of xmm2. Result doublewords 3 to 0: a3, a2, a1, a0.
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
dest.write(src2.read())
# a register destination: bits 128 and up are unchangedRun on AMD Zen 5 (EPYC 9645): 4 cases.
Operands
| Operand | Kind | Action |
|---|---|---|
MOVDQU xmm, xmm/m128 | ||
xmm | explicit | write |
xmm/m128 | explicit | read |
MOVDQU xmm/m128, xmm | ||
xmm/m128 | explicit | write |
xmm | 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.
- All forms
SSE_TYPE_4M
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.
| ISA set | CPUID | Processors |
|---|---|---|
SSE2 | SSE2 | Every x86-64 processor in XED’s model and Zen 3 to Zen 6 |
More SSE2 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. - 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-64 (MOVDQU,VMOVDQU8/
16/ 32/ 64) - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3 (325384-093, September 2026)
- AMD64 Architecture Programmer's Manual, Volume 2: System Programming (24593, rev. 3.46, October 2026)
- AMD64 Architecture Programmer's Manual, Volume 4: 128-Bit, 256-Bit, and 512-Bit Media Instructions (26568, rev. 3.27, July 2026)
- Intel 64 and IA-32 Architectures Optimization Reference Manual, Volume 1 (248966-051, October 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 timings come from LLVM's scheduling models, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.