Extensions
Forms
6 (6 EVEX)
Data
Intel XED v2026.08.23

VDBPSADBW computes sums of absolute differences of four unsigned bytes, four sums per quadword, each in a word. It works in two steps, in each 128-bit lane:

  1. The second source is shuffled: imm8 picks, two bits per position, which of the lane’s four doublewords goes where, as PSHUFD does.
  2. In each quadword, the low doubleword of the first source is compared with the shuffled bytes at offsets 0 to 3 and 1 to 4, giving words 0 and 1, and the high doubleword with the bytes at offsets 2 to 5 and 3 to 6, giving words 2 and 3.

A sum is at most 1020, so nothing saturates: in the cases recorded on Zen 5, bytes of FFh against zeros gave 03FCh in every word, and 80h against 7Fh gave 4.

MPSADBW in every lane

The shuffle makes it more general than MPSADBW, which compares one block with eight windows that each start a byte further on. VDBPSADBW does the same for every lane when the block is in all four doublewords of the first source and imm8 is 94h: the shuffle then lines up the lane’s doublewords 0, 1, 1 and 2, so that the eight words are the SADs at offsets 0 to 7. A ZMM register thus holds 32 such sums, against MPSADBW’s eight; VMPSADBW gets to 16 with AVX2 and to 32 only with AVX10.2. Other immediates give other offsets, and different doublewords in the first source compare two blocks at once.

Masking

Unlike VPSADBW, it takes a write mask, one bit per word, with merging or zeroing. The mask covers the destination only: a memory source is read in full whatever the mask, and a page fault on it is not suppressed for masked-off words: its exception class, E4NF, is one of those the SDM lists without fault suppression.

It is part of AVX512BW, so -march=x86-64-v4 enables it, and AVX10.1. A C loop of eight sliding 4-byte SADs does not become VDBPSADBW in GCC 14 or Clang 23 at -O2 with that target; the intrinsics _mm512_dbsad_epu8 and kin give it in both, with _mask_ and _maskz_ variants for the two kinds of masking.

Forms

Every encoding of VDBPSADBW that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
VDBPSADBW xmm {k}{z}, xmm, xmm, imm8 VDBPSADBW_XMMu16_MASKmskw_XMMu8_XMMu8_IMM8_AVX512EVEX.128.66.0F3A.W0 42 /r ibAVX10.1 or AVX512BW + AVX512VL
VDBPSADBW xmm {k}{z}, xmm, m128, imm8 VDBPSADBW_XMMu16_MASKmskw_XMMu8_MEMu8_IMM8_AVX512EVEX.128.66.0F3A.W0 42 /r ibAVX10.1 or AVX512BW + AVX512VL
VDBPSADBW ymm {k}{z}, ymm, ymm, imm8 VDBPSADBW_YMMu16_MASKmskw_YMMu8_YMMu8_IMM8_AVX512EVEX.256.66.0F3A.W0 42 /r ibAVX10.1 or AVX512BW + AVX512VL
VDBPSADBW ymm {k}{z}, ymm, m256, imm8 VDBPSADBW_YMMu16_MASKmskw_YMMu8_MEMu8_IMM8_AVX512EVEX.256.66.0F3A.W0 42 /r ibAVX10.1 or AVX512BW + AVX512VL
VDBPSADBW zmm {k}{z}, zmm, zmm, imm8 VDBPSADBW_ZMMu16_MASKmskw_ZMMu8_ZMMu8_IMM8_AVX512EVEX.512.66.0F3A.W0 42 /r ibAVX10.1 or AVX512BW
VDBPSADBW zmm {k}{z}, zmm, m512, imm8 VDBPSADBW_ZMMu16_MASKmskw_ZMMu8_MEMu8_IMM8_AVX512EVEX.512.66.0F3A.W0 42 /r ibAVX10.1 or AVX512BW

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.
Modelxmm {k}{z}, xmm, xmm, imm8no mask
ymm {k}{z}, ymm, ymm, imm8no mask
xmm {k}{z}, xmm, xmm, imm8with a mask, zeroing
ymm {k}{z}, ymm, ymm, imm8with a mask, zeroing
xmm {k}{z}, xmm, m128, imm8no maskxmm {k}{z}, xmm, m128, imm8with a mask, zeroingymm {k}{z}, ymm, m256, imm8no maskymm {k}{z}, ymm, m256, imm8with a mask, zeroingzmm {k}{z}, zmm, zmm, imm8no maskzmm {k}{z}, zmm, zmm, imm8with a mask, zeroingzmm {k}{z}, zmm, m512, imm8no maskzmm {k}{z}, zmm, m512, imm8with a mask, zeroing
Skylake-SP, Ice Lake3 / 1p53 / 1p59 / 1p59 / 1p510 / 1p510 / 1p53 / 1p53 / 1p510 / 1p510 / 1p5
Sapphire Rapids3 / 1p55 / 1p510 / 1p513 / 1p511 / 1p513 / 1p53 / 1p55 / 1p511 / 1p513 / 1p5
Zen 43 / 0.51FP0 FP1 FP2 FP33 / 0.51FP0 FP1 FP2 FP310 / 0.5FP0 FP1 FP2 FP310 / 0.5FP0 FP1 FP2 FP310 / 0.5FP0 FP1 FP2 FP310 / 0.5FP0 FP1 FP2 FP34 / 1FP0 FP1 FP2 FP34 / 1FP0 FP1 FP2 FP311 / 1FP0 FP1 FP2 FP311 / 1FP0 FP1 FP2 FP3
  1. Zen 4 model, xmm form: AMD's spreadsheets give latency 4 for Zen 4 and Zen 5 (AMD 57647, row 1100; AMD 58455, row 293).

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.

Double-block sums of absolute differences: the doublewords of xmm3 are first shuffled within each lane, two bits of imm8 picking each, into t; then each quadword gives four words: bytes 3 to 0 of the quadword of xmm2 against bytes 3 to 0 and 4 to 1 of t's, its bytes 7 to 4 against bytes 5 to 2 and 6 to 3.
VDBPSADBW with imm8 = 0x72With imm8 = 0x72, result word i is the sum of the absolute differences between the four bytes of xmm2 from byte 8(i/4)+4((i%4)/2) and those of t from byte 8(i/4)+i%4, byte by byte. Result words 7 to 0: r7, unchanged (bit 6 of k1 is 0), r5, r4, r3, r2, r1, r0.0123xmm3or m128b2031tshuffledb11111110k1r0r1r2r3r4r5r7xmm10123xmm2a

Example: imm8 = 0x72 (0111 0010 in binary): t holds doublewords 1, 3, 0, 2 of xmm3, from doubleword 3 down. The sources are drawn in doublewords, with a tick between the bytes of t; each bar under t is a window, joined to the word it makes. The ymm and zmm forms repeat this in each 128-bit lane, with the same imm8. The forms write under a mask: where its bit is 0, the element keeps its old value, or zeroes it with {z}.

With imm8 = 0x72, result word i is the sum of the absolute differences between the four bytes of xmm2 from byte 8(i/4)+4((i%4)/2) and those of t from byte 8(i/4)+i%4, byte by byte. Result words 7 to 0: r7, unchanged (bit 6 of k1 is 0), r5, r4, r3, r2, r1, r0.

Operation

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

t = 0                            # src3, its doublewords
for i in range(VL // 32):        # shuffled in each lane
    c = imm8 >> 2 * (i % 4) & 3
    t |= src3.d[i - i % 4 + c] << 32 * i
for i in range(VL // 16):        # word i, of quadword i // 4:
    a = 8 * (i // 4) + 4 * (i % 4 // 2)  # 4 bytes of zmm2
    b = 8 * (i // 4) + i % 4             # and of t
    if k1[i]:                    # 1 without a write mask
        s = 0
        for j in range(4):
            x = t >> 8 * (b + j) & 0xFF
            s += abs(zmm2.b[a + j] - x)
        zmm1.w[i] = s
    elif zeroing:
        zmm1.w[i] = 0
    # else: zmm1.w[i] keeps its value
# src3 is read whatever the mask: a fault in it is not suppressed
# zmm1 is zeroed from bit VL up

Run on AMD Zen 5 (EPYC 9645): 14 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
VDBPSADBW xmm {k}{z}, xmm, xmm/m128, imm8 VDBPSADBW ymm {k}{z}, ymm, ymm/m256, imm8 VDBPSADBW zmm {k}{z}, zmm, zmm/m512, imm8
xmm, ymm, zmmexplicitwrite (masked)
{k}explicitread (write mask)
xmm, ymm, zmmexplicitread
xmm/m128, ymm/m256, zmm/m512explicitread
imm8explicitread

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.

All forms
AVX512-E4NF

Attributes

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

All forms
write masking

Intrinsics

The C intrinsics of Clang 23.1.2 that compile to VDBPSADBW, 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_dbsad_epu8 __m128i _mm_dbsad_epu8(__m128i A, __m128i B, const int imm)

VDBPSADBW xmm, xmm, xmm, imm8 EVEX.128 -mavx512vl -mavx512bw

_mm_mask_dbsad_epu8 __m128i _mm_mask_dbsad_epu8(__m128i W, __mmask8 U, __m128i A, __m128i B, const int imm)

VDBPSADBW xmm {k}, xmm, xmm, imm8 EVEX.128 -mavx512vl -mavx512bw

_mm_maskz_dbsad_epu8 __m128i _mm_maskz_dbsad_epu8(__mmask8 U, __m128i A, __m128i B, const int imm)

VDBPSADBW xmm {k}{z}, xmm, xmm, imm8 EVEX.128 -mavx512vl -mavx512bw

_mm256_dbsad_epu8 __m256i _mm256_dbsad_epu8(__m256i A, __m256i B, const int imm)

VDBPSADBW ymm, ymm, ymm, imm8 EVEX.256 -mavx512vl -mavx512bw

_mm256_mask_dbsad_epu8 __m256i _mm256_mask_dbsad_epu8(__m256i W, __mmask16 U, __m256i A, __m256i B, const int imm)

VDBPSADBW ymm {k}, ymm, ymm, imm8 EVEX.256 -mavx512vl -mavx512bw

_mm256_maskz_dbsad_epu8 __m256i _mm256_maskz_dbsad_epu8(__mmask16 U, __m256i A, __m256i B, const int imm)

VDBPSADBW ymm {k}{z}, ymm, ymm, imm8 EVEX.256 -mavx512vl -mavx512bw

_mm512_dbsad_epu8 __m512i _mm512_dbsad_epu8(__m512i A, __m512i B, const int imm)

VDBPSADBW zmm, zmm, zmm, imm8 EVEX.512 -mavx512bw

_mm512_mask_dbsad_epu8 __m512i _mm512_mask_dbsad_epu8(__m512i W, __mmask32 U, __m512i A, __m512i B, const int imm)

VDBPSADBW zmm {k}, zmm, zmm, imm8 EVEX.512 -mavx512bw

_mm512_maskz_dbsad_epu8 __m512i _mm512_maskz_dbsad_epu8(__mmask32 U, __m512i A, __m512i B, const int imm)

VDBPSADBW zmm {k}{z}, zmm, zmm, imm8 EVEX.512 -mavx512bw

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
AVX512BW_128

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

or

AVX512BW + AVX512VL
CPUID.(EAX=07H,ECX=0):EBX[30] AVX512BW
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
AVX512BW_256
Same as AVX512BW_128Same as AVX512BW_128
AVX512BW_512

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

or

AVX512BW
CPUID.(EAX=07H,ECX=0):EBX[30] AVX512BW

Same as AVX512BW_128

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 Advanced Vector Extensions 10.2 Architecture Specification, revision 7.0 (361050-007, April 2026)
  6. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2C, page 5-154 (VDBPSADBW)

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.