Extensions
Forms
8 (4 Legacy, 4 EVEX)
Data
Intel XED v2026.08.23

CRC32 folds 1, 2, 4 or 8 bytes of data into a running 32-bit checksum. Despite the name, the checksum is CRC-32C, with Castagnoli’s polynomial 0x1EDC6F41, not the CRC-32 whose polynomial is 0x04C11DB7: a format that uses the latter gains nothing from this instruction and needs another method, such as carry-less multiplication with PCLMULQDQ.

What it leaves to the program

The instruction does the polynomial division and nothing else. CRC-32C as formats define it starts from all ones and inverts the final value, so code does both around its loop: crc = ~crc, one CRC32 per chunk of data, then ~crc. With them, the nine bytes “123456789” give 0xE3069283; without them, 0x58E3FA20.

The CRC lives in bits 31:0 of the destination. The 64-bit form reads 8 bytes per step, but its result is still 32 bits wide with bits 63:32 cleared, and the upper half of the incoming register does not count: Zen 5 gave 9F787F65H, the result from FFFFFFFFH, for the bytes “12345678” whether RCX held 32206E22FFFFFFFFH or BD8D94DAFFFFFFFFH. So _mm_crc32_u64 returns a 64-bit value whose upper half is zero, and a loop can feed it back as it is.

The data enters bit 0 first, and the CRC’s coefficients are stored in reverse, which is why the page’s pseudocode shifts right and uses 0x82F63B78, the polynomial with its bits reversed. AMD’s manual calls this reversal “inverting” the operands and the result; it means the order of the bits, not their values, and Zen 5’s results agree.

Compilers

GCC 14 and Clang 23 at -O2 never turn a bitwise CRC-32C loop into CRC32, even with -msse4.2; Clang replaces the inner loop by a 256-entry table instead. The intrinsics are the way to the instruction: _mm_crc32_u8 in a byte loop becomes crc32 eax, byte ptr [rsi], which Clang unrolls eight times.

Speed

Intel’s optimization manual uses CRC32 as a string hash and finds it about twice as fast as a multiply-and-add hash for short and medium strings (Section 14.1.1). In Zen 5, three of the six integer ALUs can compute CRCs (AMD’s Zen 5 guide, Section 2.10.2), and the guide’s instruction table lists CRC32 as one macro-op with a latency of three cycles.

CRC32 belongs to SSE4.2 and so to x86-64-v2; APX adds an EVEX form that reaches its new registers.

In the optimization guide

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

Golden Cove and Raptor Cove

  • Integer execution: Port 1 alone runs the slower integer operations: multiplication, PDEP and PEXT, popcnt, bsr, crc32 and the double shifts with an immediate count, which LLVM’s models give a latency of three cycles and one per cycle.

Silvermont to Goldmont Plus

Tremont

  • Integer execution: Three ALU ports run simple integer operations, three a cycle; shifts go to port 00 only, and multiplication, division, popcnt, crc32 and the bit operations to port 01 only.

Forms

Every encoding of CRC32 that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
CRC32 r32/64, m8 CRC32_GPRyy_MEMbF2 0F 38 F0 /rSSE4.2
CRC32 r32/64, r8 CRC32_GPRyy_GPR8bF2 0F 38 F0 /rSSE4.2
CRC32 r32/64, m16/32/64 CRC32_GPRyy_MEMvF2 0F 38 F1 /rSSE4.2
CRC32 r32/64, r16/32/64 CRC32_GPRyy_GPRvF2 0F 38 F1 /rSSE4.2
CRC32 r32/64, r8 CRC32_GPRy_GPR8i8_APXEVEX.LLZ.NP.MAP4.SCALABLE F0 /rAPX_F
CRC32 r32/64, m8 CRC32_GPRy_MEMi8_APXEVEX.LLZ.NP.MAP4.SCALABLE F0 /rAPX_F
CRC32 r32/64, r16/32/64 CRC32_GPRy_GPRv_APXEVEX.LLZ.NP.MAP4.SCALABLE F1 /rAPX_F
CRC32 r32/64, m16/32/64 CRC32_GPRy_MEMv_APXEVEX.LLZ.NP.MAP4.SCALABLE F1 /rAPX_F

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.
Modelr32, m8
r64, m8
r32, m16
r32, m32
r64, m64
r32, r8
r64, r8
r32, r16r32, r32r64, r64
Sandy Bridge, Haswell, Broadwell, Skylake, Skylake-SP, Ice Lake, Alder Lake, Sapphire Rapids8 / 1p13 / 1p13 / 1p13 / 1p13 / 1p1
Lunar Lake7 / 1.33p1353 / 1p1353 / 1p1353 / 1p1353 / 1p135
Silvermont6 / 1IEC1 MEC3 / 1IEC13 / 1IEC13 / 1IEC13 / 1IEC1
Piledriver6 / 2EX0 EX12 / 2EX0 EX15 / 5EX0 EX16 / 6EX0 EX110 / 8.5EX0 EX1
Zen, Zen 210 / 1FPU03 / 1FPU03 / 1FPU03 / 1FPU03 / 1FPU0
Zen 3, Zen 47 / 1ALU13 / 1ALU13 / 1ALU13 / 1ALU13 / 1ALU1
Jaguar6 / 2ALU0 ALU13 / 2ALU0 ALU13 / 2ALU0 ALU13 / 2ALU0 ALU13 / 2ALU0 ALU1

Operation

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

crc = dest & 0xFFFFFFFF          # the CRC so far: bits 31:0, even of r64
crc ^= src.read()                # the data enters bit 0 first
for i in range(src.bits):
    if crc & 1:
        crc = crc >> 1 ^ 0x82F63B78  # Castagnoli's polynomial 1EDC6F41
    else:                            # with its bits reversed
        crc >>= 1
dest.write(crc)                  # bits 63:32 cleared, even of r64
# no inversion before or after: CRC-32C as software computes it
# starts from all ones and inverts the result

Run on AMD Zen 5 (EPYC 9645): 70 cases. The APX forms were not run: none of these processors has APX.

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
CRC32 r32/64, r/m8 CRC32 r32/64, r/m16/32/64
r32/64explicitread, write
r/m8/16/32/64explicitread

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.

Legacy forms
none in XED
EVEX forms
APX-EVEX-INT

Intrinsics

The C intrinsics of Clang 23.1.2 that compile to CRC32, 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
__crc32b unsigned int __crc32b(unsigned int __C, unsigned char __D)

CRC32 r32/64, r8 Legacy -mcrc32

__crc32d unsigned int __crc32d(unsigned int __C, unsigned int __D)

CRC32 r32/64, r16/32/64 Legacy -mcrc32

__crc32q unsigned long long __crc32q(unsigned long long __C, unsigned long long __D)

CRC32 r32/64, r16/32/64 Legacy -mcrc32

__crc32w unsigned int __crc32w(unsigned int __C, unsigned short __D)

CRC32 r32/64, r16/32/64 Legacy -mcrc32

_mm_crc32_u16 unsigned int _mm_crc32_u16(unsigned int __C, unsigned short __D)

CRC32 r32/64, r16/32/64 Legacy -mcrc32

_mm_crc32_u32 unsigned int _mm_crc32_u32(unsigned int __C, unsigned int __D)

CRC32 r32/64, r16/32/64 Legacy -mcrc32

_mm_crc32_u64 unsigned long long _mm_crc32_u64(unsigned long long __C, unsigned long long __D)

CRC32 r32/64, r16/32/64 Legacy -mcrc32

_mm_crc32_u8 unsigned int _mm_crc32_u8(unsigned int __C, unsigned char __D)

CRC32 r32/64, r8 Legacy -mcrc32

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
SSE42

SSE4.2
CPUID.01H:ECX[20] SSE4.2

Nehalem, Westmere, 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, Silvermont, Goldmont, Goldmont Plus, Tremont, Snow Ridge, Lakefield, Sierra Forest, Clearwater Forest, Knights Landing, Knights Mill, K10 (Family 10h), Bulldozer, Piledriver, Zen, Zen+, Zen 2, Zen 3, Zen 4, Zen 5, Zen 6

Note: XED's AMD_K10 inherits everything from its Westmere chip, including SSSE3, SSE4.1, SSE4.2, AES-NI and PCLMULQDQ; GCC's -march=amdfam10 has none of them.

APX_F

APX_F
CPUID.(EAX=07H,ECX=1):EDX[21] APX_F

Nova Lake, Diamond Rapids

More SSE4.2 instructions

More APX instructions

All 88 APX 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 2A, page 3-205 (CRC32)
  6. Intel Advanced Performance Extensions (Intel APX) Architecture Specification, revision 9.0 (355828-009, August 2026)
  7. AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions (24594, rev. 3.39, October 2026)
  8. Intel 64 and IA-32 Architectures Optimization Reference Manual, Volume 1 (248966-051, October 2026)
  9. 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.