Instruction
VPBROADCASTMB2Q
Copies the low 8 bits of a mask register, zero-extended, to every quadword.
- Extensions
- Forms
- 3 (3 EVEX)
- Data
- Intel XED v2026.08.23
VPBROADCASTMB2Q copies the low 8 bits of a mask register, zero-extended, into every quadword of a vector register; the 56 bits above them are ignored. Its sibling VPBROADCASTMW2D copies the low 16 bits into every doubleword. Both came with AVX512CD, the conflict-detection extension of VPCONFLICTD, and are the only ones in it that take a mask register as their source. The recorded cases on Zen 5 copied C5h from a mask of 72B39A75A974B9C5h into all eight quadwords of a zmm register, and the xmm and ymm forms zeroed the register above their two or four.
Not VPMOVM2Q
VPMOVM2Q spreads a mask out: bit i becomes all ones or all zeros in element i. VPBROADCASTMB2Q keeps the bits together and gives each element the whole mask, which suits work done bit by bit inside an element. VPCONFLICTQ, for one, sets bit j of element i when element j below it holds the same value; ANDing that with the broadcast mask keeps only the conflicts with the elements the mask selects.
In compiled code
The instruction takes no write mask: EVEX.z and the mask field must be
zero, or it raises #UD. The intrinsics are _mm512_broadcastmb_epi64
and _mm512_broadcastmw_epi32, with 128- and 256-bit versions under
AVX512VL. With -march=znver5 at -O2, GCC 14 compiles the intrinsic to
KMOVB and VPBROADCASTMB2Q, while Clang 23 moves the mask argument, which
arrives in a general register, straight into
VPBROADCASTQ. For a mask that a compare left in a
mask register, _mm512_set1_epi64(_mm512_cmpeq_epi64_mask(x, y)), it is
the other way round: Clang emits VPBROADCASTMB2Q, GCC a KMOVQ to a
general register and VPBROADCASTQ, and the same holds for 16 bits and
VPBROADCASTMW2D.
AMD’s Zen 5 guide lists both as one macro-op with a latency of 2 cycles.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
VPBROADCASTMB2Q zmm, k
VPBROADCASTMB2Q_ZMMu64_MASKu64_AVX512CD | EVEX.512.F3.0F38.W1 2A /r | AVX10.1 or AVX512CD |
VPBROADCASTMB2Q xmm, k
VPBROADCASTMB2Q_XMMu64_MASKu64_AVX512 | EVEX.128.F3.0F38.W1 2A /r | AVX10.1 or AVX512CD + AVX512VL |
VPBROADCASTMB2Q ymm, k
VPBROADCASTMB2Q_YMMu64_MASKu64_AVX512 | EVEX.256.F3.0F38.W1 2A /r | AVX10.1 or AVX512CD + AVX512VL |
Latency and throughput
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 quadwords.
Result quadwords 7 to 0: a0, a0, a0, a0, a0, a0, a0, a0.
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
x = k2.read() & 0xFF # the low 8 bits
for i in range(VL // 64):
zmm1.q[i] = x
# zmm1 is zeroed from bit VL upRun on AMD Zen 5 (EPYC 9645): 3 cases.
Operands
| Operand | Kind | Action |
|---|---|---|
VPBROADCASTMB2Q xmm, k VPBROADCASTMB2Q ymm, k VPBROADCASTMB2Q zmm, k | ||
xmm, ymm, zmm | explicit | write |
k | 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.
- All forms
AVX512-E6NF
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 |
|---|---|---|
AVX512CD_512 | AVX10.1 or AVX512CD | 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 |
AVX512CD_128 | AVX10.1 or AVX512CD + 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 |
AVX512CD_256 | Same as AVX512CD_128 | Same as AVX512CD_128 |
More AVX10.1 instructions
- VPADDD
- VPADDQ
- VPADDSB
- VPADDSW
- VPADDUSB
- VPADDUSW
- VPADDW
- VPALIGNR
- VPANDD
- VPANDND
- VPANDNQ
- VPANDQ
- VPAVGB
- VPAVGW
- VPBLENDMB
- VPBLENDMD
- VPBLENDMQ
- VPBLENDMW
- VPBROADCASTB
- VPBROADCASTD
- VPBROADCASTMW2D
- VPBROADCASTQ
- VPBROADCASTW
- VPCLMULQDQ
- VPCMPB
- VPCMPD
- VPCMPEQB
- VPCMPEQD
- VPCMPEQQ
- VPCMPEQW
- VPCMPGTB
- VPCMPGTD
- VPCMPGTQ
- VPCMPGTW
- VPCMPQ
- VPCMPUB
- VPCMPUD
- VPCMPUQ
- VPCMPUW
- VPCMPW
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. - 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 Advanced Vector Extensions 10.2 Architecture Specification, revision 7.0 (361050-007, April 2026)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2C, page 5-454 (VPBROADCASTM)
- 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 timings come from LLVM's scheduling models, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.