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

CVTPS2PI converts the two low singles of an XMM register, or of eight bytes of memory, to two signed doublewords in an MMX register. It rounds as MXCSR.RC says, like CVTPS2DQ, whose page covers the rounding and the out-of-range rule; CVTTPS2PI is the truncating form. It came with SSE, which had no integer operations on XMM registers, and its result goes to MMX: writing an MMX register sets the x87 TOP to 0 and marks every tag valid, and a pending x87 exception is taken first.

Two cases on Zen 5

  • With RC set to truncate and all exceptions masked, the singles CF000001H, just below -2^31, and 4EFFFFFFH, the largest single below 2^31, gave 80000000H, the integer indefinite, and 7FFFFF80H, and IE was set in MXCSR.
  • With RC at nearest, two NaNs in XMM8 gave 80000000H each and set IE.

In both, the 64-bit result went into the low 64 bits of the x87 register that holds the MMX register, with bits 79:64 set to all ones, as every MMX write leaves them.

Memory operand

Intel’s entry calls the source an XMM register or a 128-bit memory location, against its own opcode table, which gives xmm/m64, and against AMD’s manual, which reads a 64-bit memory location.

In our builds

At -O2 in 64-bit code, GCC 14 and Clang 23 compile _mm_cvtps_pi32() to MOVQ and CVTPS2DQ in XMM registers, never touching the MMX unit. In 32-bit builds, GCC keeps CVTPS2PI, and Clang still uses CVTPS2DQ and returns the pair in EDX:EAX. AMD’s Zen 5 table lists CVTPS2PI as one macro-op on pipes FP2 or FP3, two per cycle.

Forms

Every encoding of CVTPS2PI that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
CVTPS2PI mm, m64 CVTPS2PI_MMXq_MEMqNP 0F 2D /rSSE
CVTPS2PI mm, xmm CVTPS2PI_MMXq_XMMqNP 0F 2D /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.
Modelmm, m64mm, xmm
Sandy Bridge9 / 1p13 / 1p1
Haswell9 / 1p14 / 1p15
Broadwell8 / 1p14 / 1p15
Skylake9 / 1p05 / 1p05
Skylake-SP, Ice Lake9 / 0.5p015 / 1p015
Alder Lake, Sapphire Rapids13 / 1p09 / 1p015
Lunar Lake13 / 2.67V0 V1100 / 2V0 V1 V2 V3
Bonnell5 / 5p15 / 5p1
Silvermont8 / 2FPC05 / 2FPC0
Piledriver9 / 1.5FPCVT FPU04 / 1FPCVT FPSTO FPU0
Zen, Zen 212 / 1FPU34 / 1FPU3
Zen 3, Zen 410 / 0.5FP2 FP33 / 0.5FP2 FP3
Jaguar8 / 1FPU13 / 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.

Element-wise on the low two singles: each element of mm1 comes from the single in the same place in xmm2; the rest of xmm2 is not read.
CVTPS2PI: element by elementResult element i comes from single i of xmm2, for the low two only. Result elements 1 to 0: r1, r0.0123xmm2or m64ar0r1mm1

Result element i comes from single i of xmm2, for the low two only. Result elements 1 to 0: r1, r0.

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):
    mm1.d[i] = cvt_int(src2.f32[i], 32)
# x87: TOP = 0, all tags valid, bits 79:64 of mm1's register all ones

Run on AMD Zen 5 (EPYC 9645): 3 cases.

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
CVTPS2PI mm, xmm/m64
mmexplicitwrite
xmm/m64explicitread

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-fp

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.

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 2A, page 3-231 (CVTPS2PI)
  5. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
  6. AMD64 Architecture Programmer's Manual, Volume 5: 64-Bit Media and x87 Floating-Point Instructions (26569, rev. 3.16, November 2021), Wayback Machine copy of AMD's PDF
  7. 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.