Instruction
VCVTDQ2PD
Converts packed signed doublewords to doubles.
VCVTDQ2PD converts signed doublewords to doubles, always 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.
CVTDQ2PD explains why no rounding or flag is possible
and how compilers widen an array in halves, and
VCVTDQ2PS is the conversion to singles, which does
round. Being exact, the EVEX form takes neither a rounding mode nor
{sae}; what it adds is masking per double and a broadcast doubleword.
Exact where singles are not
The cases recorded on Zen 5 show integers that a single cannot hold: 16,777,217, 16,777,219 and 2,147,483,647 came back as themselves, as did -2,147,483,647 and -2^31 in the EVEX form. MXCSR came back unchanged in every case, whatever its rounding field said.
Masks per double
Each mask bit selects one result double. With E1H in the low byte of
K5, vcvtdq2pd zmm14{k5}, ymm8 wrote doubles 0, 5, 6 and 7 and kept
the other four; the 256-bit form with a memory source and the same
mask wrote only double 0, since it uses only the mask’s low four bits.
Unsigned integers
For unsigned elements the signed conversion is wrong from 2^31 up,
and our builds at -O2 handle that in three ways. For
-march=x86-64-v3, GCC 14 converts as signed, compares the results
with zero and adds 2^32 to the negative ones through an AND mask, and
Clang 23 zero-extends with VPMOVZXDQ and places the integers in the
significand of 2^52 before subtracting it. For x86-64-v4, GCC keeps
VCVTDQ2PD on zmm registers but compares into a mask register with
VCMPPD and adds 2^32 with a masked VADDPD, while Clang switches to
AVX-512’s VCVTUDQ2PD.
For signed integers, GCC widens a loaded vector in two halves around
VEXTRACTI128 (VEXTRACTI32X8 for x86-64-v4), and Clang converts
straight from memory, to ymm registers for x86-64-v3 and
x86-64-v4 and to zmm for znver5.
In the optimization guide
What the optimization guide says about VCVTDQ2PD, 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 |
|---|---|---|
VCVTDQ2PD xmm, m64
VCVTDQ2PD_XMMdq_MEMq | VEX.128.F3.0F.WIG E6 /r | AVX |
VCVTDQ2PD xmm, xmm
VCVTDQ2PD_XMMdq_XMMq | VEX.128.F3.0F.WIG E6 /r | AVX |
VCVTDQ2PD ymm, m128
VCVTDQ2PD_YMMqq_MEMdq | VEX.256.F3.0F.WIG E6 /r | AVX |
VCVTDQ2PD ymm, xmm
VCVTDQ2PD_YMMqq_XMMdq | VEX.256.F3.0F.WIG E6 /r | AVX |
VCVTDQ2PD zmm {k}{z}, ymm
VCVTDQ2PD_ZMMf64_MASKmskw_YMMi32_AVX512 | EVEX.512.F3.0F.W0 E6 /rEVEX.LIG.F3.0F.W0 E6 /r | AVX10.1 or AVX512F |
VCVTDQ2PD zmm {k}{z}, m256/m32bcst
VCVTDQ2PD_ZMMf64_MASKmskw_MEMi32_AVX512 | EVEX.512.F3.0F.W0 E6 /r | AVX10.1 or AVX512F |
VCVTDQ2PD xmm {k}{z}, xmm
VCVTDQ2PD_XMMf64_MASKmskw_XMMi32_AVX512 | EVEX.128.F3.0F.W0 E6 /r | AVX10.1 or AVX512F + AVX512VL |
VCVTDQ2PD xmm {k}{z}, m64/m32bcst
VCVTDQ2PD_XMMf64_MASKmskw_MEMi32_AVX512 | EVEX.128.F3.0F.W0 E6 /r | AVX10.1 or AVX512F + AVX512VL |
VCVTDQ2PD ymm {k}{z}, xmm
VCVTDQ2PD_YMMf64_MASKmskw_XMMi32_AVX512 | EVEX.256.F3.0F.W0 E6 /r | AVX10.1 or AVX512F + AVX512VL |
VCVTDQ2PD ymm {k}{z}, m128/m32bcst
VCVTDQ2PD_YMMf64_MASKmskw_MEMi32_AVX512 | EVEX.256.F3.0F.W0 E6 /r | AVX10.1 or AVX512F + AVX512VL |
Latency and throughput
| Model | xmm, m64 | xmm, xmm | ymm, m128 | ymm, xmmymm {k}{z}, xmm | zmm {k}{z}, ymmno mask | zmm {k}{z}, ymmwith a mask, zeroing | zmm {k}{z}, m256/m32bcst | xmm {k}{z}, xmm | xmm {k}{z}, m64/m32bcst | ymm {k}{z}, m128/m32bcst |
|---|---|---|---|---|---|---|---|---|---|---|
| Sandy Bridge | 10 / 1p15 | 4 / 1p15 | 10 / 1p15 | 4 / 1p15 | ||||||
| Haswell | 10 / 1p1 | 4 / 1p15 | 12 / 1p1 | 6 / 1p15 | ||||||
| Broadwell | 9 / 1p1 | 4 / 1p15 | 11 / 1p1 | 6 / 1p15 | ||||||
| Skylake | 10 / 0.5p01 | 5 / 1p015 | 11 / 0.5p01 | 7 / 1p015 | ||||||
| Skylake-SP, Ice Lake | 11 / 1p05 | 4 / 0.5p01 | 13 / 1p05 | 7 / 1p015 | 7 / 1p05 | 4 / 0.5p05 | 11 / 0.5p01 | 5 / 1p015 | 10 / 0.5p01 | 11 / 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 | 12 / 1p0 | 5 / 1p015 | 11 / 0.5p01 | 12 / 0.5p01 |
| Lunar Lake | 11 / 0.5V0 V1 | 5 / 0.5V0 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 | 12 / 1FPU3 | 5 / 1FPU1 FPU2 FPU3 | 12 / 1FPU3 | 5 / 1FPU1 FPU2 FPU3 | ||||||
| Zen 2 | 12 / 1FPU3 | 3 / 1FPU1 FPU2 FPU3 | 12 / 1FPU3 | 3 / 1FPU1 FPU2 FPU3 | ||||||
| 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 | 10 / 1FP2 FP3 | 3 / 11FP2 FP3 | 4 / 22FP2 FP3 | 4 / 22FP2 FP3 | 11 / 2FP2 FP3 | 3 / 0.5FP2 FP3 | 10 / 0.5FP2 FP3 | 10 / 1FP2 FP3 |
| Jaguar | 8 / 1FPU1 | 3 / 1FPU1 STC | 8 / 2FPU1 | 3 / 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 doublewords. 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.sd[i])
elif zeroing:
zmm1.f64[i] = 0
# else: zmm1.f64[i] keeps its value
# m32bcst: src2.d[i] is the m32 for every i
# zmm1 is zeroed from bit VL upRun on AMD Zen 5 (EPYC 9645): 15 cases.
Operands
| Operand | Kind | Action |
|---|---|---|
VCVTDQ2PD xmm, xmm/m64 VCVTDQ2PD ymm, xmm/m128 | ||
xmm, ymm | explicit | write |
xmm/m64/128 | explicit | read |
VCVTDQ2PD xmm {k}{z}, xmm/m64/m32bcst VCVTDQ2PD ymm {k}{z}, xmm/m128/m32bcst VCVTDQ2PD zmm {k}{z}, ymm/m256/m32bcst | ||
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-5- EVEX forms
AVX512-E5
Attributes
What else XED records about the forms. How to read.
- 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 VCVTDQ2PD, 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_cvtepi32_pd
__m128d _mm_cvtepi32_pd(__m128i __a) |
|
_mm_mask_cvtepi32_pd
__m128d _mm_mask_cvtepi32_pd(__m128d __W, __mmask8 __U, __m128i __A) |
|
_mm_maskz_cvtepi32_pd
__m128d _mm_maskz_cvtepi32_pd(__mmask8 __U, __m128i __A) |
|
_mm256_cvtepi32_pd
__m256d _mm256_cvtepi32_pd(__m128i __a) |
|
_mm256_mask_cvtepi32_pd
__m256d _mm256_mask_cvtepi32_pd(__m256d __W, __mmask8 __U, __m128i __A) |
|
_mm256_maskz_cvtepi32_pd
__m256d _mm256_maskz_cvtepi32_pd(__mmask8 __U, __m128i __A) |
|
_mm512_cvtepi32_pd
__m512d _mm512_cvtepi32_pd(__m256i __A) |
|
_mm512_cvtepi32lo_pd
__m512d _mm512_cvtepi32lo_pd(__m512i __A) |
|
_mm512_mask_cvtepi32_pd
__m512d _mm512_mask_cvtepi32_pd(__m512d __W, __mmask8 __U, __m256i __A) |
|
_mm512_mask_cvtepi32lo_pd
__m512d _mm512_mask_cvtepi32lo_pd(__m512d __W, __mmask8 __U, __m512i __A) |
|
_mm512_maskz_cvtepi32_pd
__m512d _mm512_maskz_cvtepi32_pd(__mmask8 __U, __m256i __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
- VADDSS
- VADDSUBPD
- VADDSUBPS
- VANDNPD
- VANDNPS
- VANDPD
- VANDPS
- VBLENDPD
- VBLENDPS
- VBLENDVPD
- VBLENDVPS
- VBROADCASTF128
- VBROADCASTSD
- VBROADCASTSS
- VCMPPD
- VCMPPS
- VCMPSD
- VCMPSS
- VCOMISD
- VCOMISS
- VCVTDQ2PS
- VCVTPD2DQ
- VCVTPD2PS
- VCVTPS2DQ
- VCVTPS2PD
- VCVTSD2SI
- VCVTSD2SS
- VCVTSI2SD
- VCVTSI2SS
- VCVTSS2SD
- VCVTSS2SI
- VCVTTPD2DQ
- VCVTTPS2DQ
- VCVTTSD2SI
- VCVTTSS2SI
- VDIVPD
- VDIVPS
- VDIVSD
- VDIVSS
- VDPPD
More AVX10.1 instructions
- VBROADCASTF64X2
- VBROADCASTF64X4
- VBROADCASTI32X2
- VBROADCASTI32X4
- VBROADCASTI32X8
- VBROADCASTI64X2
- VBROADCASTI64X4
- VBROADCASTSD
- VBROADCASTSS
- VCMPPD
- VCMPPH
- VCMPPS
- VCMPSD
- VCMPSH
- VCMPSS
- VCOMISD
- VCOMISH
- VCOMISS
- VCOMPRESSPD
- VCOMPRESSPS
- VCVTDQ2PH
- VCVTDQ2PS
- VCVTNE2PS2BF16
- VCVTNEPS2BF16
- VCVTPD2DQ
- VCVTPD2PH
- VCVTPD2PS
- VCVTPD2QQ
- VCVTPD2UDQ
- VCVTPD2UQQ
- VCVTPH2DQ
- VCVTPH2PD
- VCVTPH2PS
- VCVTPH2PSX
- VCVTPH2QQ
- VCVTPH2UDQ
- VCVTPH2UQQ
- VCVTPH2UW
- VCVTPH2W
- VCVTPS2DQ
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-208 (CVTDQ2PD)
- 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)
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.