Instruction
VDIVPD
Divides packed doubles.
VDIVPD divides doubles, two, four or eight at a time, and is DIVPD in VEX and EVEX encodings. VDIVPS covers what the encodings add and how compilers trade a division of singles for an estimate; doubles are a different story.
No shortcut for doubles
With -ffast-math, GCC 14 and Clang 23 at -O2 replace a division of
floats by a reciprocal estimate and a Newton-Raphson step, but for
a[i] = b[i] / c[i] over doubles they keep VDIVPD: on ymm registers
for -march=x86-64-v3, on zmm for znver5, and for -march=x86-64-v4
on zmm in GCC and ymm in Clang. The estimates that exist for doubles,
VRCP14PD among them, have a relative error of up to
2^-14, too far from a double’s 53 bits for one refining step. A
division by a constant is another matter: see VMULPD.
Zero, infinity and DAZ
The cases recorded on Zen 5 tell the invalid operation from a division
by zero. 0/0 and -0/0 gave the indefinite FFF8000000000000H and set the
invalid flag; a finite number over zero gave an infinity of the
quotient’s sign and set the divide-by-zero flag; an infinity over zero
gave infinity with neither. With DAZ set, a denormal divided by zero
counted as 0/0 and gave the indefinite, not an infinity. Under
{rd-sae}, the largest denormal divided by -2^-1023 gave its exact
quotient, -1.9999999999999996, and no flag changed although MXCSR
unmasked the denormal exception.
On Zen 5
AMD’s Zen 5 guide gives VDIVPD a latency of 13 cycles and a throughput of 0.25 per cycle at every width, against 10 cycles and 0.4 for VDIVPS, in the same divide unit on pipe FP1: a zmm VDIVPD delivers at most two quotients per cycle.
In the optimization guide
What the optimization guide says about VDIVPD, a line per claim. Each links to the claim in the guide, with its sources and where they differ.
Haswell and Broadwell
- AVX2 and FMA: Apart from division, square root, AES and the SSE4.2 string compares, the vector units are 256 bits wide. sources differ
Skylake to Cooper Lake
- Vectors on all parts: Division and square root are pipelined, and 256-bit forms have the latency of 128-bit ones: LLVM’s models give DIVPS 11 cycles, SQRTPS 12, DIVPD 14 and SQRTPD 18.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
VDIVPD xmm, xmm, m128
VDIVPD_XMMdq_XMMdq_MEMdq | VEX.128.66.0F.WIG 5E /r | AVX |
VDIVPD xmm, xmm, xmm
VDIVPD_XMMdq_XMMdq_XMMdq | VEX.128.66.0F.WIG 5E /r | AVX |
VDIVPD ymm, ymm, m256
VDIVPD_YMMqq_YMMqq_MEMqq | VEX.256.66.0F.WIG 5E /r | AVX |
VDIVPD ymm, ymm, ymm
VDIVPD_YMMqq_YMMqq_YMMqq | VEX.256.66.0F.WIG 5E /r | AVX |
VDIVPD zmm {k}{z}, zmm, zmm, {er}
VDIVPD_ZMMf64_MASKmskw_ZMMf64_ZMMf64_AVX512 | EVEX.512.66.0F.W1 5E /r | AVX10.1 or AVX512F |
VDIVPD zmm {k}{z}, zmm, m512/m64bcst
VDIVPD_ZMMf64_MASKmskw_ZMMf64_MEMf64_AVX512 | EVEX.512.66.0F.W1 5E /r | AVX10.1 or AVX512F |
VDIVPD xmm {k}{z}, xmm, xmm
VDIVPD_XMMf64_MASKmskw_XMMf64_XMMf64_AVX512 | EVEX.128.66.0F.W1 5E /r | AVX10.1 or AVX512F + AVX512VL |
VDIVPD xmm {k}{z}, xmm, m128/m64bcst
VDIVPD_XMMf64_MASKmskw_XMMf64_MEMf64_AVX512 | EVEX.128.66.0F.W1 5E /r | AVX10.1 or AVX512F + AVX512VL |
VDIVPD ymm {k}{z}, ymm, ymm
VDIVPD_YMMf64_MASKmskw_YMMf64_YMMf64_AVX512 | EVEX.256.66.0F.W1 5E /r | AVX10.1 or AVX512F + AVX512VL |
VDIVPD ymm {k}{z}, ymm, m256/m64bcst
VDIVPD_YMMf64_MASKmskw_YMMf64_MEMf64_AVX512 | EVEX.256.66.0F.W1 5E /r | AVX10.1 or AVX512F + AVX512VL |
Latency and throughput
| Model | xmm, xmm, m128xmm {k}{z}, xmm, m128/m64bcst | xmm, xmm, xmmxmm {k}{z}, xmm, xmm | ymm, ymm, m256ymm {k}{z}, ymm, m256/m64bcst | ymm, ymm, ymmymm {k}{z}, ymm, ymm | zmm {k}{z}, zmm, zmm, {er} | zmm {k}{z}, zmm, m512/m64bcst |
|---|---|---|---|---|---|---|
| Sandy Bridge | 28 / 22SBFPDivider p0 | 22 / 22SBFPDivider p0 | 52 / 44SBFPDivider p0 p5 | 45 / 44SBFPDivider p0 p5 | ||
| Haswell | 26 / 14HWFPDivider p0 | 20 / 14HWFPDivider p0 | 42 / 28HWFPDivider p0 p1 p5 | 35 / 28HWFPDivider p0 p1 p5 | ||
| Broadwell | 19 / 8BWFPDivider p0 | 14 / 8BWFPDivider p0 | 29 / 16BWFPDivider p0 p1 p5 | 23 / 16BWFPDivider p0 p1 p5 | ||
| Skylake | 20 / 4SKLFPDivider p0 | 14 / 4SKLFPDivider p0 | 21 / 8SKLFPDivider p0 | 14 / 8SKLFPDivider p0 | ||
| Skylake-SP | 20 / 4SKXFPDivider p0 | 14 / 4SKXFPDivider p0 | 21 / 8SKXFPDivider p0 | 14 / 8SKXFPDivider p0 | 23 / 16SKXFPDivider p0 p5 | 30 / 16SKXFPDivider p0 p5 |
| Ice Lake | 20 / 4ICXFPDivider p0 | 14 / 4ICXFPDivider p0 | 21 / 8ICXFPDivider p0 | 14 / 8ICXFPDivider p0 | 23 / 16ICXFPDivider p0 p5 | 30 / 16ICXFPDivider p0 p5 |
| Alder Lake | 20 / 1p0 | 14 / 1p0 | 21 / 1p0 | 14 / 1p0 | ||
| Sapphire Rapids | 20 / 1p0 | 14 / 1p0 | 21 / 1p0 | 14 / 1p0 | 23 / 2p05 | 30 / 2p05 |
| Lunar Lake | 16 / 5V0 V1 | 10 / 5V0 V1 | 17 / 5V0 V1 | 10 / 5V0 V1 | ||
| Piledriver | 14 / 4.5FPFMA FPU1 | 9 / 4.5FPFMA FPU1 | 14 / 9FPFMA FPU1 | 9 / 9FPFMA FPU1 | ||
| Zen | 20 / 5FPU3 | 13 / 5FPU3 | 22 / 9FPU3 | 15 / 9FPU3 | ||
| Zen 2 | 20 / 6FPU3 | 13 / 6FPU3 | 20 / 6FPU3 | 13 / 6FPU3 | ||
| Zen 3 | 20 / 5FP1 | 13 / 5FP1 | 20 / 5FP1 | 13 / 5FP1 | ||
| Zen 4 | 20 / 5FP1 | 13 / 5FP1 | 20 / 5FP1 | 13 / 5FP1 | 13 / 10FP1 | 20 / 10FP1 |
| Jaguar | 24 / 19FPM FPU1 | 19 / 19FPM FPU1 | 43 / 38FPM FPU1 | 38 / 38FPM FPU1 | ||
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.
Every double works alike: 2, 4 and 8 doubles in the xmm, ymm and zmm forms. The EVEX forms write under a mask: where its bit is 0, the element keeps its old value, or zeroes it with {z}. With m64bcst, one double from memory stands for every element of the last source.
Result double i comes from double i of xmm2 and xmm3. Result doubles 1 to 0: a1/b1, a0/b0.
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
a = zmm2.f64[i]
b = src3.f64[i]
zmm1.f64[i] = div(a, b)
elif zeroing:
zmm1.f64[i] = 0
# else: zmm1.f64[i] keeps its value
# m64bcst: src3.f64[i] is the m64 for every i
# {er}: the form's rounding, not MXCSR.RC, and no flags
# zmm1 is zeroed from bit VL upRun on AMD Zen 5 (EPYC 9645): 15 cases.
Operands
| Operand | Kind | Action |
|---|---|---|
VDIVPD xmm, xmm, xmm/m128 VDIVPD ymm, ymm, ymm/m256 | ||
xmm, ymm | explicit | write |
xmm, ymm | explicit | read |
xmm/m128, ymm/m256 | explicit | read |
VDIVPD xmm {k}{z}, xmm, xmm/m128/m64bcst VDIVPD ymm {k}{z}, ymm, ymm/m256/m64bcst VDIVPD zmm {k}{z}, zmm, zmm/m512/m64bcst, {er} | ||
xmm, ymm, zmm | explicit | write (masked) |
{k} | explicit | read (write mask) |
xmm, ymm, zmm | explicit | read |
xmm/m128/m64bcst, ymm/m256/m64bcst, zmm/m512/m64bcst | 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-2- EVEX forms
AVX512-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 Full); memory fault suppression
Intrinsics
The C intrinsics of Clang 23.1.2 that compile to VDIVPD, 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_div_pd
__m128d _mm_div_pd(__m128d __a, __m128d __b) |
|
_mm_mask_div_pd
__m128d _mm_mask_div_pd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B) |
|
_mm_maskz_div_pd
__m128d _mm_maskz_div_pd(__mmask8 __U, __m128d __A, __m128d __B) |
|
_mm256_div_pd
__m256d _mm256_div_pd(__m256d __a, __m256d __b) |
|
_mm256_mask_div_pd
__m256d _mm256_mask_div_pd(__m256d __W, __mmask8 __U, __m256d __A, __m256d __B) |
|
_mm256_maskz_div_pd
__m256d _mm256_maskz_div_pd(__mmask8 __U, __m256d __A, __m256d __B) |
|
_mm512_div_pd
__m512d _mm512_div_pd(__m512d __a, __m512d __b) |
|
_mm512_div_round_pd
__m512d _mm512_div_round_pd(__m512d A, __m512d B, const int R) |
|
_mm512_mask_div_pd
__m512d _mm512_mask_div_pd(__m512d __W, __mmask8 __U, __m512d __A, __m512d __B) |
|
_mm512_mask_div_round_pd
__m512d _mm512_mask_div_round_pd(__m512d W, __mmask8 U, __m512d A, __m512d B, const int R) |
|
_mm512_maskz_div_pd
__m512d _mm512_maskz_div_pd(__mmask8 __U, __m512d __A, __m512d __B) |
|
_mm512_maskz_div_round_pd
__m512d _mm512_maskz_div_round_pd(__mmask8 U, __m512d A, __m512d B, const int R) |
|
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
- VCMPSD
- VCMPSS
- VCOMISD
- VCOMISS
- VCVTDQ2PD
- VCVTDQ2PS
- VCVTPD2DQ
- VCVTPD2PS
- VCVTPS2DQ
- VCVTPS2PD
- VCVTSD2SI
- VCVTSD2SS
- VCVTSI2SD
- VCVTSI2SS
- VCVTSS2SD
- VCVTSS2SI
- VCVTTPD2DQ
- VCVTTPS2DQ
- VCVTTSD2SI
- VCVTTSS2SI
- VDIVPS
- VDIVSD
- VDIVSS
- VDPPD
- VDPPS
- VEXTRACTF128
- VEXTRACTPS
- VHADDPD
- VHADDPS
- VHSUBPD
- VHSUBPS
- VINSERTF128
- VINSERTPS
- VLDDQU
- VLDMXCSR
- VMASKMOVDQU
- VMASKMOVPD
- VMASKMOVPS
- VMAXPD
- VMAXPS
More AVX10.1 instructions
- VCVTTPS2UDQ
- VCVTTPS2UQQ
- VCVTTSD2SI
- VCVTTSD2USI
- VCVTTSH2SI
- VCVTTSH2USI
- VCVTTSS2SI
- VCVTTSS2USI
- VCVTUDQ2PD
- VCVTUDQ2PH
- VCVTUDQ2PS
- VCVTUQQ2PD
- VCVTUQQ2PH
- VCVTUQQ2PS
- VCVTUSI2SD
- VCVTUSI2SH
- VCVTUSI2SS
- VCVTUW2PH
- VCVTW2PH
- VDBPSADBW
- VDIVPH
- VDIVPS
- VDIVSD
- VDIVSH
- VDIVSS
- VDPBF16PS
- VEXPANDPD
- VEXPANDPS
- VEXTRACTF32X4
- VEXTRACTF32X8
- VEXTRACTF64X2
- VEXTRACTF64X4
- VEXTRACTI32X4
- VEXTRACTI32X8
- VEXTRACTI64X2
- VEXTRACTI64X4
- VEXTRACTPS
- VFCMADDCPH
- VFCMADDCSH
- VFCMULCPH
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-267 (DIVPD)
- 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.