Extensions
Forms
5 (2 VEX, 3 EVEX)
Data
Intel XED v2026.08.23

VGATHERDPS loads singles from scattered addresses: element i comes from a base address plus element i of an index vector, a signed 32-bit integer, times a scale of 1, 2, 4 or 8. This is d[i] = t[idx[i]] in one instruction. A mask chooses which elements are loaded; the others keep the destination’s old values, and their addresses are never accessed, so they cannot fault.

The two encodings take the mask differently:

  • AVX2 (VEX): a third vector register, whose elements select by their sign bits. The destination, the index and the mask must be three different registers, or the instruction raises #UD.
  • AVX-512 (EVEX): a mask register, which cannot be K0 since a gather must have a mask, and only merging, no {z}. The destination must differ from the index register.

The mask is consumed

The instruction clears each mask element as its load completes, and ends with the whole mask zero: the cases recorded on Zen 5 show all 64 bits of the mask register cleared, even for an XMM gather of four elements. If a load faults partway, the elements already loaded stay written with their mask bits cleared, so that the instruction resumes where it stopped. Compiled code therefore rebuilds the mask before every gather: for _mm256_i32gather_ps, GCC 14 and Clang 23 at -O2 make an all-ones vector each time, and KXNORW makes an all-ones mask register for the EVEX form. Clang also zeroes the destination first, so that the gather does not wait for whatever wrote it last, as Intel’s optimization guide recommends (Section 15.16.4); GCC does not, and copies the index to another register to keep the three apart.

When to use it

Neither compiler vectorized a loop like d[i] = t[idx[i]] for generic targets at -O2: GCC 14 kept it scalar, and Clang 23 used VGATHERDPS only when -march named a processor such as skylake or znver5. Both vendors’ guides advise against gathers where the addresses are predictable: Intel’s suggests loads and shuffles for sequential data, short strides and few elements, and notes a latency of about 50 cycles in Crestmont, where the gather is microcoded (Sections 15.16.4 and 4.1.9.6); AMD’s Zen 5 guide says that vector loads and shuffles give more load bandwidth when the indices are known ahead (Section 2.11.2).

VPGATHERDD gathers doublewords, VGATHERQPS takes 64-bit indices, and VSCATTERDPS is AVX-512’s store in the other direction.

In the optimization guide

What the optimization guide says about VGATHERDPS, a line per claim. Each links to the claim in the guide, with its sources and where they differ.

Vectors

  • Gathers and scatters: Where the layout of the data is known, vector loads and shuffles usually beat a gather.
  • Gathers and scatters: Issue gathers early, gather many elements at once, use doubleword indices for 32-bit data and zero the destination first.
  • Gathers and scatters: Gathers beat scalar loads on Skylake, while AMD lists them as microcode on Zen 3, Zen 4 and Zen 5.
  • Gathers and scatters: GCC 14.2 builds no gathers when tuning for Zen 4 or Skylake, and LLVM none for Zen 3.

Crestmont and Gracemont

  • Vectors and AVX2: Gathers are microcoded on these cores and take about 50 cycles.

Golden Cove and Raptor Cove

  • Vectors, AVX-512 and AMX: A gather is a load micro-op for each element plus a few more: LLVM’s models give an eight-element VPGATHERDD 12 micro-ops and a latency of 30 cycles, and the 16-element one of Sapphire Rapids 19 micro-ops.

Haswell and Broadwell

  • Gathers: Haswell is the first core with gathers, and each one runs as many micro-ops; Broadwell runs them much faster.

Skylake to Cooper Lake

  • Vectors on all parts: Gathers are faster than on Broadwell and beat a sequence of scalar loads unless they fetch only two elements or the data comes from memory rather than the caches.

Zen and Zen+

  • Vectors and floating point: Gathers such as VPGATHERDD and VGATHERDPS are microcoded, 20 cycles with YMM registers in AMD’s spreadsheet, and GCC 14.2 builds none when tuning for znver1: vector loads and shuffles do better where the indices are known.

Zen 2

  • Vectors and floating point: Gathers such as VPGATHERDD are microcoded, in AMD’s spreadsheet and LLVM’s model, so vector loads and shuffles beat them when the indices are known in advance.

Zen 3

  • Vectors and floating point: Gathers such as VPGATHERDD are microcoded, and a register loaded in pieces is slower than one full-width load, so vector loads and shuffles beat both when the indices are known in advance.

Zen 4

  • Vectors and floating point: A gather is slower than vector loads and shuffles when the indices are known in advance, and a register loaded in pieces is slower than one full-width load.

Zen 5

Forms

Every encoding of VGATHERDPS that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
VGATHERDPS ymm, vm32y, ymm VGATHERDPS_YMMf32_MEMf32_YMMi32_VL256VEX.256.66.0F38.W0 92 /rAVX2
VGATHERDPS xmm, vm32x, xmm VGATHERDPS_XMMf32_MEMf32_XMMi32_VL128VEX.128.66.0F38.W0 92 /rAVX2
VGATHERDPS zmm {k}, vm32z VGATHERDPS_ZMMf32_MASKmskw_MEMf32_AVX512_VL512EVEX.512.66.0F38.W0 92 /rAVX10.1 or AVX512F
VGATHERDPS xmm {k}, vm32x VGATHERDPS_XMMf32_MASKmskw_MEMf32_AVX512_VL128EVEX.128.66.0F38.W0 92 /rAVX10.1 or AVX512F + AVX512VL
VGATHERDPS ymm {k}, vm32y VGATHERDPS_YMMf32_MASKmskw_MEMf32_AVX512_VL256EVEX.256.66.0F38.W0 92 /rAVX10.1 or AVX512F + AVX512VL

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.
Modelymm, vm32y, ymmxmm, vm32x, xmmzmm {k}, vm32zxmm {k}, vm32xymm {k}, vm32y
Haswell22 / 6.5p015616 / 4p0156
Broadwell21 / 4p015619 / 4p0156
Skylake22 / 4p01520 / 2p015
Skylake-SP, Ice Lake22 / 4p01520 / 2p01525 / 8p015619 / 2p015621 / 4p0156
Alder Lake30 / 2.67p01528 / 1.33p015
Sapphire Rapids30 / 2.67p01528 / 1.33p01530 / 5.33p0527 / 1.33p01529 / 2.67p015
Lunar Lake30 / 2.67V0 V1 V2 V3 p1 p3 p528 / 1.33V0 V1 V2 V3 p1 p3 p5
Zen, Zen 2100 / 0.25100 / 0.25
Zen 35 / 0.33AGU0 AGU1 AGU2 LSU Load5 / 0.33AGU0 AGU1 AGU2 LSU Load
Zen 45 / 0.33AGU0 AGU1 AGU2 LSU Load5 / 0.33AGU0 AGU1 AGU2 LSU Load5 / 0.33AGU0 AGU1 AGU2 LSU Load5 / 0.33AGU0 AGU1 AGU2 LSU Load5 / 0.33AGU0 AGU1 AGU2 LSU Load

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.

Gather: single i of the result is loaded from base + index i × scale, where its mask bit is 1; elsewhere it keeps its old value.VEX forms
VGATHERDPS with example indicesWith the example indices (m followed by the memory element), result singles 7 to 0: m3, m14, unchanged, m7, m0, m11, m2, m5.0235711141468910121315memory11111110ymm3m5m2m11m0m7m14m3ymm15211077143vm32yindex

Example: indices 3, 14, 7, 7, 0, 11, 2, 5 from element 7 down, mask ymm3 = 0xDF; memory elements are numbered from the base address in units of the scale. The other forms gather 4 elements, one for each index. The AVX2 forms take the mask from the sign bits of a vector register; the mask is cleared as the elements complete.

With the example indices (m followed by the memory element), result singles 7 to 0: m3, m14, unchanged, m7, m0, m11, m2, m5.

Gather: single i of the result is loaded from base + index i × scale, where its mask bit is 1; elsewhere it keeps its old value.EVEX forms
VGATHERDPS with example indicesWith the example indices (m followed by the memory element), result singles 7 to 0: m3, m14, unchanged, m7, m0, m11, m2, m5.k1

Example: indices 3, 14, 7, 7, 0, 11, 2, 5 from element 7 down, mask k1 = 0xDF; memory elements are numbered from the base address in units of the scale. The other forms gather 4 and 16 elements, one for each index. The mask is cleared as the elements complete.

With the example indices (m followed by the memory element), result singles 7 to 0: m3, m14, unchanged, m7, m0, m11, m2, m5.

Operation

What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.

VEX forms
x = mem.index.number
if x in (ymm1.number, ymm3.number):
    fault(UD)
if ymm1.number == ymm3.number:
    fault(UD)
for i in range(VL // 32):
    if ymm3.sd[i] < 0:
        a = mem.index.sd[i] * mem.scale
        ymm1.d[i] = load(mem.base + a, 32)
ymm3.write(0)
# ymm1 is zeroed from bit VL up

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

EVEX forms
if mem.index.number == zmm1.number:
    fault(UD)
for i in range(VL // 32):
    if k1[i]:
        a = mem.index.sd[i] * mem.scale
        zmm1.d[i] = load(mem.base + a, 32)
k1.write(0)  # all of it
# zmm1 is zeroed from bit VL up

Run on AMD Zen 5 (EPYC 9645): 15 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
VGATHERDPS xmm, vm32x, xmm VGATHERDPS ymm, vm32y, ymm
xmm, ymmexplicitconditional read, write
vm32x, vm32yexplicitread
xmm, ymmexplicitread, write
VGATHERDPS xmm {k}, vm32x VGATHERDPS ymm {k}, vm32y VGATHERDPS zmm {k}, vm32z
xmm, ymm, zmmexplicitwrite (masked)
{k}explicitread, write (write mask)
vm32x, vm32y, vm32zexplicitread

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-12
EVEX forms
AVX512-E12

Attributes

What else XED records about the forms. How to read.

All forms
gather
EVEX forms
write masking; memory fault suppression

Intrinsics

The C intrinsics of Clang 23.1.2 that compile to VGATHERDPS, 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.

IntrinsicCompiles to
_mm_i32gather_ps __m128 _mm_i32gather_ps(float const *m, __m128i i, const int s)

VGATHERDPS xmm, vm32x, xmm VEX.128 -mavx2

_mm_mask_i32gather_ps __m128 _mm_mask_i32gather_ps(__m128 a, float const *m, __m128i i, __m128 mask, const int s)

VGATHERDPS xmm, vm32x, xmm VEX.128 -mavx2

_mm_mmask_i32gather_ps __m128 _mm_mmask_i32gather_ps(__m128 v1_old, __mmask8 mask, __m128i index, void const *addr, const int scale)

VGATHERDPS xmm {k}, vm32x EVEX.128 -mavx512vl

_mm256_i32gather_ps __m256 _mm256_i32gather_ps(float const *m, __m256i i, const int s)

VGATHERDPS ymm, vm32y, ymm VEX.256 -mavx2

_mm256_mask_i32gather_ps __m256 _mm256_mask_i32gather_ps(__m256 a, float const *m, __m256i i, __m256 mask, const int s)

VGATHERDPS ymm, vm32y, ymm VEX.256 -mavx2

_mm256_mmask_i32gather_ps __m256 _mm256_mmask_i32gather_ps(__m256 v1_old, __mmask8 mask, __m256i index, void const *addr, const int scale)

VGATHERDPS ymm {k}, vm32y EVEX.256 -mavx512vl

_mm512_i32gather_ps __m512 _mm512_i32gather_ps(__m512 index, void const *addr, const int scale)

VGATHERDPS zmm {k}, vm32z EVEX.512 -mavx512f

_mm512_mask_i32gather_ps __m512 _mm512_mask_i32gather_ps(__m512 v1_old, __mmask16 mask, __m512 index, void const *addr, const int scale)

VGATHERDPS zmm {k}, vm32z EVEX.512 -mavx512f

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
AVX2GATHER

AVX2
CPUID.(EAX=07H,ECX=0):EBX[5] AVX2

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, Zen, Zen+, Zen 2, Zen 3, Zen 4, Zen 5, Zen 6
AVX512F_512

AVX10.1
CPUID.(EAX=07H,ECX=1):EDX[19] AVX10
CPUID.(EAX=24H,ECX=0):EBX[7:0] ≥ 1 AVX10 version

or

AVX512F
CPUID.(EAX=07H,ECX=0):EBX[16] 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
AVX512F_128

AVX10.1
CPUID.(EAX=07H,ECX=1):EDX[19] AVX10
CPUID.(EAX=24H,ECX=0):EBX[7:0] ≥ 1 AVX10 version

or

AVX512F + AVX512VL
CPUID.(EAX=07H,ECX=0):EBX[16] AVX512F
CPUID.(EAX=07H,ECX=0):EBX[31] AVX512VL

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, Zen 4, Zen 5, Zen 6
AVX512F_256
Same as AVX512F_128Same as AVX512F_128

More AVX2 instructions

All 138 AVX2 instructions

More AVX10.1 instructions

All 686 AVX10.1 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. 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.
  4. LLVM 23.1.2's x86 scheduling models (commit 85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them.
  5. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2C, page 5-362 (VGATHERDPS/VGATHERDPD); Volume 2C, page 5-365 (VGATHERDPS/VGATHERQPS)
  6. Intel Advanced Vector Extensions 10.2 Architecture Specification, revision 7.0 (361050-007, April 2026)
  7. Intel 64 and IA-32 Architectures Optimization Reference Manual, Volume 1 (248966-051, October 2026)
  8. 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.