Instruction
CVTPI2PD
Converts two signed doublewords from an MMX register or memory to doubles.
- Extensions
- Forms
- 2 (2 Legacy)
- Data
- Intel XED v2026.08.23
CVTPI2PD converts two signed doublewords, from an MMX register or eight bytes of memory, to two doubles that fill an XMM register. Every 32-bit integer is exact as a double, so it raises no floating-point exception and MXCSR.RC never matters. It came with SSE2 as the double-precision sibling of CVTPI2PS, which writes only the low half of its destination; CVTPI2PD writes all 128 bits, as CVTDQ2PD does from an XMM register. Only the MMX register form switches the x87 unit to MMX use, as CVTPS2PI describes; the memory form leaves the x87 state alone and takes no pending x87 exception.
Two cases on Zen 5
- From memory. -2147483647 (80000001h) and 2147483584 (7FFFFFC0h) became the doubles C1DFFFFFFFC00000h and 41DFFFFFF0000000h, exactly, and MXCSR kept its flags.
- From MM6. 7FFFFFC0h and FFFFFFFEh became 2147483584.0 and -2.0.
Both cases kept bits 511:128 of ZMM4: CVTPI2PD is a legacy SSE instruction.
In our builds
At -O2 in 64-bit code, GCC 14 and Clang 23 compile _mm_cvtpi32_pd to
CVTDQ2PD, from an XMM register or straight from memory. In 32-bit builds
GCC keeps CVTPI2PD for an MMX value and uses CVTDQ2PD for one loaded
from memory; Clang always uses CVTDQ2PD. AMD’s Zen 5 latency
spreadsheet lists the memory form as one macro-op on pipe FP2 or FP3 and
the MMX register form as two.
Forms
Latency and throughput
| Model | xmm, m64 | xmm, mm |
|---|---|---|
| Sandy Bridge | 10 / 1p15 | 4 / 1p15 |
| Haswell | 10 / 1p1 | 4 / 1p15 |
| Broadwell | 9 / 1p1 | 4 / 1p15 |
| Skylake | 10 / 0.5p01 | 5 / 1p015 |
| Skylake-SP, Ice Lake | 9 / 0.5p01 | 4 / 0.5p01 |
| Alder Lake, Sapphire Rapids | 11 / 0.5p01 | 6 / 1p015 |
| Lunar Lake | 11 / 0.5V0 V1 | 100 / 2V0 V1 V2 V3 |
| Bonnell | 8 / 7p1 | 7 / 6p01 |
| Silvermont | 8 / 2FPC0 | 5 / 2FPC0 |
| Piledriver | 13 / 1.5FPCVT FPU0 | 6 / 1FPCVT FPSTO FPU0 |
| Zen, Zen 2 | 12 / 1FPU3 | 3 / 1FPU3 |
| Zen 3 | 2 / 3FP2 FP3 | 2 / 3FP2 FP3 |
| Zen 4 | 10 / 0.5FP2 FP3 | 3 / 0.5FP2 FP3 |
| Jaguar | 8 / 1FPU1 | 3 / 1FPU1 STC |
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.
Result doubles 1 to 0: a1, 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(2):
xmm1.f64[i] = to_f64(src2.sd[i])
# bits 128 and up of the register are unchangedRun on AMD Zen 5 (EPYC 9645): 3 cases.
Operands
| Operand | Kind | Action |
|---|---|---|
CVTPI2PD xmm, mm/m64 | ||
xmm | explicit | write |
mm/m64 | 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
mmx-nofp
Attributes
What else XED records about the forms. How to read.
- All forms
- follows MXCSR; may abort a TSX transaction
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 2A, page 3-223 (CVTPI2PD)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 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.