Extensions
Forms
2 (2 Legacy)
Data
Intel XED v2026.08.23

MOVHPS moves 64 bits, two singles, between memory and the high half of an XMM register: the load replaces bits 127:64 and keeps bits 63:0, the store writes those eight bytes and no others. It is the SSE original of MOVHPD, which does the same with a 66 prefix and whose page explains how the merging load builds a vector from two places. With a register in place of memory, its opcode 0F 16 is MOVLHPS. The memory operand need not be aligned, and the legacy load keeps bits 128 and up (see mixing SSE and AVX), while VMOVHPS takes the low half from a second register and zeros everything above bit 127. On Zen 5, the recorded movhps xmm0, qword ptr [mem] kept XMM0’s low quadword and its bits 511:128 and placed the eight bytes above, and the store movhps qword ptr [mem], xmm0 wrote XMM0’s high quadword and left the following bytes as they were.

Pairs of floats

In our builds at -O2 for the x86-64 baseline:

  • _mm_loadh_pi and _mm_storeh_pi, whose pointers have the MMX type __m64 *, are MOVHPS in GCC 14 and Clang 23.
  • Building (__m128){p[0], p[1], q[0], q[1]} from two pairs is a MOVSD and a MOVHPS in Clang; GCC loads four single floats with MOVSS and combines them with UNPCKLPS and MOVLHPS.
  • Storing elements 2 and 3 of a vector to p[0] and p[1] is the store form in Clang, and PSRLDQ by 8 and a MOVLPS store in GCC.
  • Splitting an array of float pairs into two arrays, Clang loads each output vector in halves, with MOVSD and MOVHPS; GCC loads whole vectors and rearranges them with MOVLHPS and SHUFPS.

Both vendors advise against such halves. Intel’s optimization manual prefers 16-byte loads followed by shuffles to loading halves with MOVLPS and MOVHPS, which adds a dependency (Section 7.5.1.2), and AMD’s Zen 5 guide recommends whole-register loads and stores, with any unavoidable half loads placed next to each other (Section 2.11.2). Its latency spreadsheet gives the load one macro-op and the store two.

Forms

Every encoding of MOVHPS that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
MOVHPS xmm, m64 MOVHPS_XMMq_MEMqNP 0F 16 /rSSE
MOVHPS m64, xmm MOVHPS_MEMq_XMMpsNP 0F 17 /rSSE

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.
Modelxmm, m64m64, xmm
Sandy Bridge7 / 1p51 / 1p4 p23
Haswell, Broadwell, Skylake, Skylake-SP6 / 1p51 / 1p2347
Ice Lake7 / 1p51 / 0.5p4789
Alder Lake, Sapphire Rapids8 / 1p512 / 0.5p4789
Lunar Lake8 / 0.5V2 V312 / 0.5p10 p11 p25 p26 p27
Bonnell1 / 1p01 / 1p0
Silvermont4 / 1FPC01 / 1MEC
Piledriver7 / 1.5FPFMA FPU0 FPU12 / 1.5AGLU01 FPSTO FPU2 FPU3 Store
Zen8 / 0.5FPU1 FPU21 / 0.5AGU0 AGU1
Zen 28 / 0.5FPU1 FPU21 / 0.33AGU0 AGU1 AGU2
Zen 3, Zen 48 / 0.5FP1 FP22 / 1FP45 FPSt LSU Store
Jaguar6 / 1FPA FPM FPU0 FPU12 / 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.

A load of the high half: m64 becomes the high quadword of the result; the other quadword comes from xmm1.MOVHPS xmm, m64
MOVHPS: the high half loadedResult quadwords 1 to 0: b0, a0.01xmm1aa0b0xmm10m64b

Result quadwords 1 to 0: b0, a0.

A store of the high half: quadword 1 of xmm2 goes to m64.MOVHPS m64, xmm
MOVHPS: the high half storedm64 receives quadword 1 of xmm2: a1.01xmm2a1m64

m64 receives quadword 1 of xmm2: a1.

Operation

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

MOVHPS xmm, m64
xmm1.q[1] = mem.q[0]  # xmm1.q[0] keeps its value
# bits 128 and up of the register are unchanged

Run on AMD Zen 5 (EPYC 9645): 1 case.

MOVHPS m64, xmm
mem.q[0] = xmm2.q[1]

Run on AMD Zen 5 (EPYC 9645): 1 case.

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
MOVHPS xmm, m64
xmmexplicitread, write
m64explicitread
MOVHPS m64, xmm
m64explicitwrite
xmmexplicitread

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_5

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
SSE

SSE
CPUID.01H:EDX[25] SSE

Every x86-64 processor in XED’s model and Zen 3 to Zen 6

More SSE instructions

All 65 SSE 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. LLVM 23.1.2's x86 scheduling models (commit 85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them.
  4. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2B, page 4-76 (MOVHPS)
  5. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
  6. AMD64 Architecture Programmer's Manual, Volume 4: 128-Bit, 256-Bit, and 512-Bit Media Instructions (26568, rev. 3.27, July 2026)
  7. Intel 64 and IA-32 Architectures Optimization Reference Manual, Volume 1 (248966-051, October 2026)
  8. 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.