Instruction
VZEROALL
Zeroes vector registers 0 to 15 (0 to 7 outside 64-bit mode) in full.
- Extensions
- Forms
- 1 (1 VEX)
- Data
- Intel XED v2026.08.23
VZEROALL sets vector registers 0 to 15 to zero, whole: XMM, YMM and, on processors with AVX-512, the full ZMM register. Outside 64-bit mode only registers 0 to 7 exist and are cleared. It has no operands and changes no flags; MXCSR is left alone. It shares opcode 0F 77 with VZEROUPPER, told apart by VEX.L (1 here, 0 there), and with EMMS, which has no VEX prefix.
What it leaves
The SDM states that ZMM16 to ZMM31 keep their values, and says nothing about the mask registers. AMD’s manual, in the edition we cite, describes it for YMM registers only. Zen 5 agrees with Intel’s text: its one recorded case cleared all 512 bits of ZMM0 to ZMM15, which started with nonzero values, and changed nothing in ZMM16 to ZMM31, K0 to K7 or MXCSR.
Compared with VZEROUPPER
VZEROUPPER, whose page covers the cost of mixing AVX and SSE code,
clears only bits 128 and up and is what compilers emit before calls and
returns. VZEROALL also clears the low halves. Both leave the upper state
clean, and Intel’s optimization manual draws them as the same transition
in its diagrams of the AVX and SSE states (Figures 15-1 and 15-2,
Section 15.3), but VZEROALL destroys every value in the sixteen
registers, including the arguments and results of the vector calling
conventions. GCC 14 and Clang 23 compile _mm256_zeroall() to it, but
put VZEROUPPER at the end of functions that used the upper halves.
It is also the slower of the two on Zen 5: AMD’s latency spreadsheet lists VZEROUPPER as one macro-op, but VZEROALL as microcoded. Where only the upper state needs to be clean, VZEROUPPER is the instruction to use.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
VZEROALL
VZEROALL | VEX.256.NP.0F.WIG 77 | AVX |
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
for i in range(16):
zmm[i] = 0Run on AMD Zen 5 (EPYC 9645): 1 case.
Operands
None: XED lists no operands for this form.
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
avx-type-8
Intrinsics
The C intrinsics of Clang 23.1.2 that compile to VZEROALL, 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 |
|---|---|
_mm256_zeroall
void _mm256_zeroall(void) |
|
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 |
More AVX instructions
- VPTEST
- VPUNPCKHBW
- VPUNPCKHDQ
- VPUNPCKHQDQ
- VPUNPCKHWD
- VPUNPCKLBW
- VPUNPCKLDQ
- VPUNPCKLQDQ
- VPUNPCKLWD
- VPXOR
- VRCPPS
- VRCPSS
- VROUNDPD
- VROUNDPS
- VROUNDSD
- VROUNDSS
- VRSQRTPS
- VRSQRTSS
- VSHUFPD
- VSHUFPS
- VSQRTPD
- VSQRTPS
- VSQRTSD
- VSQRTSS
- VSTMXCSR
- VSUBPD
- VSUBPS
- VSUBSD
- VSUBSS
- VTESTPD
- VTESTPS
- VUCOMISD
- VUCOMISS
- VUNPCKHPD
- VUNPCKHPS
- VUNPCKLPD
- VUNPCKLPS
- VXORPD
- VXORPS
- VZEROUPPER
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. - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2C, page 5-775 (VZEROALL)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
- AMD64 Architecture Programmer's Manual, Volume 4: 128-Bit and 256-Bit Media Instructions (26568, rev. 3.25, November 2021), Wayback Machine copy of AMD's PDF
- Intel 64 and IA-32 Architectures Optimization Reference Manual, Volume 1 (248966-051, October 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, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.