Instruction
VCVTPS2PD
Converts packed singles to doubles, which is exact.
VCVTPS2PD widens singles to doubles, exactly: four from an xmm register or 16 bytes into a ymm register with VEX, eight from a ymm register into a zmm one with EVEX. CVTPS2PD explains why the conversion cannot round, why each instruction reads only half a register’s worth of singles, and how GCC and Clang arrange the halves of an array. What the VEX and EVEX forms add:
- Masks per double. Each mask bit selects one result double, so a
zmm destination takes eight bits. On Zen 5,
vcvtps2pd zmm14{k5}, ymm8, {sae}with E1H in the low byte of K5 converted elements 0, 5, 6 and 7 and left the others as they were. - A broadcast single.
dword bcstwidens one single into every element. {sae}without rounding. A widening conversion is always exact, so the EVEX register form takes only{sae}, which silences the two exceptions it can raise: invalid for a signaling NaN and denormal for a denormal input. In that case, with MXCSR 1E40H (invalid and denormal unmasked), the signaling NaN 7F812345H became a quiet NaN, with no fault and no flag.
What becomes of a NaN
The single’s payload moves to the top of the double’s: Zen 5 widened
7FC12345H to 7FF82468A0000000H, the 23-bit fraction shifted up by 29
places, and the signaling 7F812345H to the same quiet value, setting
IE where {sae} was absent. VCVTPD2PS narrows the
other way and drops the low 29 bits.
Denormal inputs
Every single denormal is a normal double. With DAZ clear, Zen 5 widened -2^-127 (80400000H) to the double -2^-127 and set the denormal flag; with DAZ set, the same input gave -0.
In our builds at -O2, Clang 23 widens straight from memory, to ymm
registers for -march=x86-64-v3 and x86-64-v4 and to zmm for
znver5; GCC 14 loads a whole vector and splits it, with
VEXTRACTF128 for x86-64-v3 and
VEXTRACTF32X8 on zmm registers for x86-64-v4.
In the optimization guide
What the optimization guide says about VCVTPS2PD, a line per claim. Each links to the claim in the guide, with its sources and where they differ.
Crestmont and Gracemont
- Vectors and AVX2: The 256-bit forms that widen or insert data loaded from memory take two dependent micro-ops.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
VCVTPS2PD xmm, m64
VCVTPS2PD_XMMdq_MEMq | VEX.128.NP.0F.WIG 5A /r | AVX |
VCVTPS2PD xmm, xmm
VCVTPS2PD_XMMdq_XMMq | VEX.128.NP.0F.WIG 5A /r | AVX |
VCVTPS2PD ymm, m128
VCVTPS2PD_YMMqq_MEMdq | VEX.256.NP.0F.WIG 5A /r | AVX |
VCVTPS2PD ymm, xmm
VCVTPS2PD_YMMqq_XMMdq | VEX.256.NP.0F.WIG 5A /r | AVX |
VCVTPS2PD zmm {k}{z}, ymm, {sae}
VCVTPS2PD_ZMMf64_MASKmskw_YMMf32_AVX512 | EVEX.512.NP.0F.W0 5A /r | AVX10.1 or AVX512F |
VCVTPS2PD zmm {k}{z}, m256/m32bcst
VCVTPS2PD_ZMMf64_MASKmskw_MEMf32_AVX512 | EVEX.512.NP.0F.W0 5A /r | AVX10.1 or AVX512F |
VCVTPS2PD xmm {k}{z}, xmm
VCVTPS2PD_XMMf64_MASKmskw_XMMf32_AVX512 | EVEX.128.NP.0F.W0 5A /r | AVX10.1 or AVX512F + AVX512VL |
VCVTPS2PD xmm {k}{z}, m64/m32bcst
VCVTPS2PD_XMMf64_MASKmskw_MEMf32_AVX512 | EVEX.128.NP.0F.W0 5A /r | AVX10.1 or AVX512F + AVX512VL |
VCVTPS2PD ymm {k}{z}, xmm
VCVTPS2PD_YMMf64_MASKmskw_XMMf32_AVX512 | EVEX.256.NP.0F.W0 5A /r | AVX10.1 or AVX512F + AVX512VL |
VCVTPS2PD ymm {k}{z}, m128/m32bcst
VCVTPS2PD_YMMf64_MASKmskw_MEMf32_AVX512 | EVEX.256.NP.0F.W0 5A /r | AVX10.1 or AVX512F + AVX512VL |
Latency and throughput
| Model | xmm, m64 | xmm, xmmxmm {k}{z}, xmm | ymm, m128ymm {k}{z}, m128/m32bcst | ymm, xmmymm {k}{z}, xmm | zmm {k}{z}, ymm, {sae}no mask | zmm {k}{z}, ymm, {sae}with a mask, zeroing, with {sae} | zmm {k}{z}, m256/m32bcst | xmm {k}{z}, m64/m32bcst |
|---|---|---|---|---|---|---|---|---|
| Sandy Bridge | 7 / 1p0 | 2 / 1p05 | 7 / 1p05 | 2 / 1p05 | ||||
| Haswell | 6 / 1p0 | 2 / 1p05 | 10 / 1p0 | 4 / 1p05 | ||||
| Broadwell | 6 / 1p0 | 2 / 1p05 | 9 / 1p0 | 4 / 1p05 | ||||
| Skylake | 9 / 0.5p01 | 5 / 1p015 | 11 / 0.5p01 | 7 / 1p015 | ||||
| Skylake-SP, Ice Lake | 9 / 0.5p01 | 5 / 1p015 | 11 / 0.5p01 | 7 / 1p015 | 7 / 1p05 | 3 / 1p05 | 11 / 0.5p01 | 10 / 0.5p01 |
| Alder Lake | 11 / 0.5p01 | 5 / 1p015 | 12 / 0.5p01 | 7 / 1p015 | ||||
| Sapphire Rapids | 11 / 0.5p01 | 5 / 1p015 | 12 / 0.5p01 | 7 / 1p015 | 7 / 1p05 | 7 / 1p05 | 13 / 1p05 | 11 / 0.5p01 |
| Lunar Lake | 10 / 2V0 V1 | 5 / 2V0 V1 V2 V3 | 11 / 2.33V0 V1 | 7 / 2V0 V1 V2 V3 | ||||
| Piledriver | 13 / 1.5FPCVT FPU0 | 8 / 1FPCVT FPSTO FPU0 | 13 / 2FPCVT FPU0 | 8 / 2FPCVT FPSTO FPU0 | ||||
| Zen, Zen 2 | 10 / 1FPU3 | 3 / 1FPU3 | 10 / 1FPU3 | 3 / 1FPU3 | ||||
| Zen 3 | 10 / 0.5FP2 FP3 | 3 / 0.5FP2 FP3 | 11 / 1FP2 FP3 | 4 / 1FP2 FP3 | ||||
| Zen 4 | 10 / 0.5FP2 FP3 | 3 / 0.5FP2 FP3 | 11 / 1FP2 FP3 | 4 / 1FP2 FP3 | 6 / 2FP2 FP3 | 6 / 2FP2 FP3 | 13 / 2FP2 FP3 | 10 / 0.5FP2 FP3 |
| Jaguar | 7 / 1FPU1 | 2 / 1FPU1 STC | 7 / 2FPU1 | 2 / 2FPU1 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.
Shown for the zmm form; the xmm and ymm forms work the same on 2 and 4 singles. The EVEX forms write under a mask: where its bit is 0, the element keeps its old value, or zeroes it with {z}.
Result doubles 7 to 0: a7, unchanged (bit 6 of k1 is 0), a5, a4, a3, a2, 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(VL // 64):
if k1[i]: # 1 without a write mask
zmm1.f64[i] = to_f64(src2.f32[i])
elif zeroing:
zmm1.f64[i] = 0
# else: zmm1.f64[i] keeps its value
# m32bcst: src2.f32[i] is the m32 for every i
# {sae}: no exception flags
# zmm1 is zeroed from bit VL upRun on AMD Zen 5 (EPYC 9645): 15 cases.
Operands
| Operand | Kind | Action |
|---|---|---|
VCVTPS2PD xmm, xmm/m64 VCVTPS2PD ymm, xmm/m128 | ||
xmm, ymm | explicit | write |
xmm/m64/128 | explicit | read |
VCVTPS2PD xmm {k}{z}, xmm/m64/m32bcst VCVTPS2PD ymm {k}{z}, xmm/m128/m32bcst VCVTPS2PD zmm {k}{z}, ymm/m256/m32bcst, {sae} | ||
xmm, ymm, zmm | explicit | write (masked) |
{k} | explicit | read (write mask) |
xmm/m64/m32bcst, xmm/m128/m32bcst, ymm/m256/m32bcst | 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-3VCVTPS2PD zmm {k}{z}, ymm/m256/m32bcst, {sae}AVX512-E3VCVTPS2PD xmm {k}{z}, xmm/m64/m32bcstVCVTPS2PD ymm {k}{z}, xmm/m128/m32bcstAVX512-E2
Attributes
What else XED records about the forms. How to read.
- All forms
- follows MXCSR
- EVEX forms
- write masking
- EVEX memory forms
- embedded broadcast (tuple Half); memory fault suppression
Intrinsics
The C intrinsics of Clang 23.1.2 that compile to VCVTPS2PD, 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_cvtps_pd
__m128d _mm_cvtps_pd(__m128 __a) |
|
_mm_mask_cvtps_pd
__m128d _mm_mask_cvtps_pd(__m128d __W, __mmask8 __U, __m128 __A) |
|
_mm_maskz_cvtps_pd
__m128d _mm_maskz_cvtps_pd(__mmask8 __U, __m128 __A) |
|
_mm256_cvtps_pd
__m256d _mm256_cvtps_pd(__m128 __a) |
|
_mm256_mask_cvtps_pd
__m256d _mm256_mask_cvtps_pd(__m256d __W, __mmask8 __U, __m128 __A) |
|
_mm256_maskz_cvtps_pd
__m256d _mm256_maskz_cvtps_pd(__mmask8 __U, __m128 __A) |
|
_mm512_cvt_roundps_pd
__m512d _mm512_cvt_roundps_pd(__m256 A, const int R) |
|
_mm512_cvtps_pd
__m512d _mm512_cvtps_pd(__m256 __A) |
|
_mm512_cvtpslo_pd
__m512d _mm512_cvtpslo_pd(__m512 __A) |
|
_mm512_mask_cvt_roundps_pd
__m512d _mm512_mask_cvt_roundps_pd(__m512d W, __mmask8 U, __m256 A, const int R) |
|
_mm512_mask_cvtps_pd
__m512d _mm512_mask_cvtps_pd(__m512d __W, __mmask8 __U, __m256 __A) |
|
_mm512_mask_cvtpslo_pd
__m512d _mm512_mask_cvtpslo_pd(__m512d __W, __mmask8 __U, __m512 __A) |
|
_mm512_maskz_cvt_roundps_pd
__m512d _mm512_maskz_cvt_roundps_pd(__mmask8 U, __m256 A, const int R) |
|
_mm512_maskz_cvtps_pd
__m512d _mm512_maskz_cvtps_pd(__mmask8 __U, __m256 __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
- VANDPD
- VANDPS
- VBLENDPD
- VBLENDPS
- VBLENDVPD
- VBLENDVPS
- VBROADCASTF128
- VBROADCASTSD
- VBROADCASTSS
- VCMPPD
- VCMPPS
- VCMPSD
- VCMPSS
- VCOMISD
- VCOMISS
- VCVTDQ2PD
- VCVTDQ2PS
- VCVTPD2DQ
- VCVTPD2PS
- VCVTPS2DQ
- VCVTSD2SI
- VCVTSD2SS
- VCVTSI2SD
- VCVTSI2SS
- VCVTSS2SD
- VCVTSS2SI
- VCVTTPD2DQ
- VCVTTPS2DQ
- VCVTTSD2SI
- VCVTTSS2SI
- VDIVPD
- VDIVPS
- VDIVSD
- VDIVSS
- VDPPD
- VDPPS
- VEXTRACTF128
- VEXTRACTPS
- VHADDPD
- VHADDPS
More AVX10.1 instructions
- VCVTDQ2PH
- VCVTDQ2PS
- VCVTNE2PS2BF16
- VCVTNEPS2BF16
- VCVTPD2DQ
- VCVTPD2PH
- VCVTPD2PS
- VCVTPD2QQ
- VCVTPD2UDQ
- VCVTPD2UQQ
- VCVTPH2DQ
- VCVTPH2PD
- VCVTPH2PS
- VCVTPH2PSX
- VCVTPH2QQ
- VCVTPH2UDQ
- VCVTPH2UQQ
- VCVTPH2UW
- VCVTPH2W
- VCVTPS2DQ
- VCVTPS2PH
- VCVTPS2PHX
- VCVTPS2QQ
- VCVTPS2UDQ
- VCVTPS2UQQ
- VCVTQQ2PD
- VCVTQQ2PH
- VCVTQQ2PS
- VCVTSD2SH
- VCVTSD2SI
- VCVTSD2SS
- VCVTSD2USI
- VCVTSH2SD
- VCVTSH2SI
- VCVTSH2SS
- VCVTSH2USI
- VCVTSI2SD
- VCVTSI2SH
- VCVTSI2SS
- VCVTSS2SD
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 2A, page 3-228 (CVTPS2PD)
- 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)
- AMD64 Architecture Programmer's Manual, Volume 4: 128-Bit, 256-Bit, and 512-Bit Media Instructions (26568, rev. 3.27, July 2026)
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.