Instruction
VCVTSI2SD
Converts a signed 32- or 64-bit integer to double in the low element; the other elements come from the first source.
VCVTSI2SD converts a signed 32-bit or 64-bit integer, from a general-purpose register or memory, to a double in bits 63:0, with bits 127:64 from the first source and the register cleared above bit 127. CVTSI2SD covers the conversion, the wait on the merged register that the VEX form’s separate source exists to avoid, and the registers GCC 14 and Clang 23 name there: one zeroed before a loop, or XMM15. The VEX form needs AVX; the EVEX form, with AVX-512F or AVX10.1, has no write mask and adds a rounding mode only to the 64-bit register form. Every 32-bit integer has an exact double, and Intel’s entry says a rounding operand on the 32-bit EVEX form is ignored.
Recorded on Zen 5
{evex} vcvtsi2sd xmm24, xmm3, r14, {rz-sae}turned R14 = 8000000000000001h, -(2^63 - 1), into -(2^63 - 1024), C3DFFFFFFFFFFFFFh. MXCSR was 6600h, with the precision exception unmasked, and nothing was raised or flagged.- The EVEX 64-bit memory form read 8008000000000000h, bytes that as a double would be a negative denormal, with DAZ set (FFC0h). As an integer it is -9,221,120,237,041,090,560, which converted exactly to C3DFFE0000000000h; DAZ applies to floating-point inputs only.
vcvtsi2sd xmm7, xmm11, r9dread only R9D, 80000001h, and gave -2,147,483,647.0, whatever the upper half of R9 held.
In compiled code
In our builds at -O2, (double)x of an int or long is the VEX form
at -march=x86-64-v3 and still at -v4: GCC with a VXORPS of the
destination first, Clang with XMM15 as the first source. At -v4 the
other conversions change: an array of long becomes
VCVTQQ2PD, eight or four at a time, and an
unsigned int goes straight to VCVTUSI2SD, where
-v3 zero-extends it and uses the 64-bit VCVTSI2SD.
_mm_cvt_roundi64_sd(a, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC)
gives vcvtsi2sd xmm0, xmm0, rdi, {rz-sae} in both.
AMD’s latency spreadsheet for Zen 5 lists the VEX and EVEX rows alike: two macro-ops from a register and one from memory, a latency of 3 cycles, the figures of VCVTSI2SS.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
VCVTSI2SD xmm, xmm, m32
VCVTSI2SD_XMMdq_XMMdq_MEMd | VEX.LIG.F2.0F.W0 2A /r | AVX |
VCVTSI2SD xmm, xmm, r32
VCVTSI2SD_XMMdq_XMMdq_GPR32d | VEX.LIG.F2.0F.W0 2A /r | AVX |
VCVTSI2SD xmm, xmm, m64 64-bit mode only
VCVTSI2SD_XMMdq_XMMdq_MEMq | VEX.LIG.F2.0F.W1 2A /r | AVX |
VCVTSI2SD xmm, xmm, r64 64-bit mode only
VCVTSI2SD_XMMdq_XMMdq_GPR64q | VEX.LIG.F2.0F.W1 2A /r | AVX |
VCVTSI2SD xmm, xmm, r32
VCVTSI2SD_XMMf64_XMMf64_GPR32i32_AVX512 | EVEX.LIG.F2.0F.W0 2A /r | AVX10.1 or AVX512F |
VCVTSI2SD xmm, xmm, m32
VCVTSI2SD_XMMf64_XMMf64_MEMi32_AVX512 | EVEX.LIG.F2.0F.W0 2A /r | AVX10.1 or AVX512F |
VCVTSI2SD xmm, xmm, r64, {er} 64-bit mode only
VCVTSI2SD_XMMf64_XMMf64_GPR64i64_AVX512 | EVEX.LIG.F2.0F.W1 2A /r | AVX10.1 or AVX512F |
VCVTSI2SD xmm, xmm, m64 64-bit mode only
VCVTSI2SD_XMMf64_XMMf64_MEMi64_AVX512 | EVEX.LIG.F2.0F.W1 2A /r | AVX10.1 or AVX512F |
Latency and throughput
| Model | xmm, xmm, m32xmm, xmm, m64 | xmm, xmm, r32xmm, xmm, r64xmm, xmm, r64, {er} |
|---|---|---|
| Sandy Bridge, Haswell, Broadwell | 9 / 1p1 | 4 / 1p15 |
| Skylake | 10 / 0.5p01 | 5 / 1p015 |
| Skylake-SP, Ice Lake | 9 / 1p1 | 5 / 1p015 |
| Alder Lake, Sapphire Rapids | 11 / 0.5p01 | 7 / 1p015 |
| Lunar Lake | 10 / 2V0 V1 | 8 / 2V0 V1 p1 p3 p5 |
| Piledriver | 9 / 1.5FPCVT FPU0 | 14 / 1FPCVT FPSTO FPU0 |
| Zen | 12 / 1FPU3 | 5 / 1FPU0 FPU1 FPU3 |
| Zen 2 | 12 / 1FPU3 | 3 / 1FPU0 FPU1 FPU3 |
| Zen 3 | 10 / 1FP2 FP3 | 4 / 1FP2 FP3 |
| Zen 4 | 11 / 1FP2 FP3 | 5 / 11FP2 FP3 |
| Jaguar | 9 / 1FPU1 | 10 / 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 double 0 is computed from r32; double 1 is that of xmm2. Result doubles 1 to 0: a1, r0.
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
xmm1.f64[0] = to_f64(signed(src3))
xmm1.q[1] = xmm2.q[1]
# {er}: the form's rounding, not MXCSR.RC, and no flags
# xmm1 is zeroed from bit 128 upRun on AMD Zen 5 (EPYC 9645): 12 cases.
Operands
| Operand | Kind | Action |
|---|---|---|
VCVTSI2SD xmm, xmm, r/m32 VCVTSI2SD xmm, xmm, r/m64 64-bit mode only VCVTSI2SD xmm, xmm, r/m64, {er} 64-bit mode only | ||
xmm | explicit | write |
xmm | explicit | read |
r/m32/64 | 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-3VCVTSI2SD xmm, xmm, r/m32AVX512-E10NFVCVTSI2SD xmm, xmm, r/m64, {er}64-bit mode onlyAVX512-E3NF
Attributes
What else XED records about the forms. How to read.
VCVTSI2SD xmm, xmm, r/m32VCVTSI2SD xmm, xmm, r/m6464-bit mode onlyVCVTSI2SD xmm, xmm, r/m64, {er}64-bit mode only- follows MXCSR
Intrinsics
The C intrinsics of Clang 23.1.2 that compile to VCVTSI2SD, 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_cvt_roundi64_sd
__m128d _mm_cvt_roundi64_sd(__m128d A, long long B, const int R) |
|
_mm_cvt_roundsi64_sd
__m128d _mm_cvt_roundsi64_sd(__m128d A, long long B, const int R) |
|
_mm_cvtsi32_sd
__m128d _mm_cvtsi32_sd(__m128d __a, int __b) |
|
_mm_cvtsi64_sd
__m128d _mm_cvtsi64_sd(__m128d __a, long long __b) |
|
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 |
|---|---|---|
AVX | AVX | Sandy Bridge, Ivy Bridge, Haswell, Broadwell, Skylake, Comet Lake, Cannon Lake, Ice Lake (client), Tiger Lake, Alder Lake, Arrow Lake, Panther Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Sierra Forest, Clearwater Forest, Knights Landing, Knights Mill, Bulldozer, Piledriver, Zen, Zen+, Zen 2, Zen 3, Zen 4, Zen 5, Zen 6 |
AVX512F_SCALAR | AVX10.1 or AVX512F | Cannon Lake, Ice Lake (client), Tiger Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Knights Landing, Knights Mill, Zen 4, Zen 5, Zen 6 |
More AVX instructions
- VBLENDPS
- VBLENDVPD
- VBLENDVPS
- VBROADCASTF128
- VBROADCASTSD
- VBROADCASTSS
- VCMPPD
- VCMPPS
- VCMPSD
- VCMPSS
- VCOMISD
- VCOMISS
- VCVTDQ2PD
- VCVTDQ2PS
- VCVTPD2DQ
- VCVTPD2PS
- VCVTPS2DQ
- VCVTPS2PD
- VCVTSD2SI
- VCVTSD2SS
- VCVTSI2SS
- VCVTSS2SD
- VCVTSS2SI
- VCVTTPD2DQ
- VCVTTPS2DQ
- VCVTTSD2SI
- VCVTTSS2SI
- VDIVPD
- VDIVPS
- VDIVSD
- VDIVSS
- VDPPD
- VDPPS
- VEXTRACTF128
- VEXTRACTPS
- VHADDPD
- VHADDPS
- VHSUBPD
- VHSUBPS
- VINSERTF128
More AVX10.1 instructions
- VCVTPH2UW
- VCVTPH2W
- VCVTPS2DQ
- VCVTPS2PD
- VCVTPS2PH
- VCVTPS2PHX
- VCVTPS2QQ
- VCVTPS2UDQ
- VCVTPS2UQQ
- VCVTQQ2PD
- VCVTQQ2PH
- VCVTQQ2PS
- VCVTSD2SH
- VCVTSD2SI
- VCVTSD2SS
- VCVTSD2USI
- VCVTSH2SD
- VCVTSH2SI
- VCVTSH2SS
- VCVTSH2USI
- VCVTSI2SH
- VCVTSI2SS
- VCVTSS2SD
- VCVTSS2SH
- VCVTSS2SI
- VCVTSS2USI
- VCVTTPD2DQ
- VCVTTPD2QQ
- VCVTTPD2UDQ
- VCVTTPD2UQQ
- VCVTTPH2DQ
- VCVTTPH2QQ
- VCVTTPH2UDQ
- VCVTTPH2UQQ
- VCVTTPH2UW
- VCVTTPH2W
- VCVTTPS2DQ
- VCVTTPS2QQ
- VCVTTPS2UDQ
- VCVTTPS2UQQ
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-236 (CVTSI2SD)
- 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)
- 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 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.