Instruction
CLDEMOTE
Hints that the cache line holding a byte of memory should move from the core's caches to a more distant level, where other cores reach it sooner.
- Extensions
- Forms
- 1 (1 Legacy)
- Data
- Intel XED v2026.08.23
CLDEMOTE asks the processor to move the cache line holding a byte out of the caches next to the core to a more distant level that other cores share, typically the L3 cache of a server. It is for data that one core writes and others read next. Without it, each reader misses in its own caches and has to fetch the line from the writer’s; after a CLDEMOTE it finds the line in the shared cache. Intel’s optimization manual (Section 17.26) presents it that way and notes that the gain grows with the number of readers.
Only a hint
CLDEMOTE changes no register, flag or memory, raises no exception for any address (only a LOCK prefix makes it #UD), and the processor may ignore it: a line that is not in the caches, or one in uncacheable memory, stays where it is. Unlike CLFLUSH, CLFLUSHOPT and CLWB, it does not promise to write modified data back to memory, so it is no step towards persistence. Intel’s reference orders it only with stores to the same line, so it belongs after the last store that fills the line, and it advises that the same core not touch the line again soon afterwards, which would pull it back.
Safe without CPUID
Intel’s reference says that processors without CLDEMOTE, older ones
included, run its encoding, 0F 1C /0, as a NOP. So code may issue it
without first testing CPUID leaf 7, ECX bit 25, unlike most new
instructions. The compilers still ask for the feature: GCC 14 and Clang
23 at -O2 accept _cldemote(p) only with -mcldemote or an -march such
as sapphirerapids or sierraforest. A function that fills 64 bytes and
then calls it compiles to the stores followed by cldemote [rdi]. GCC’s
header declares the parameter as void *, so passing a const pointer
draws a warning, while Intel’s reference and Clang declare it const void *.
The Zen 5 guest that ran the probe does not report CLDEMOTE in CPUID, and AMD’s manual does not describe it, so this page has no recorded cases.
In the optimization guide
What the optimization guide says about CLDEMOTE, a line per claim. Each links to the claim in the guide, with its sources and where they differ.
Tremont
- Instruction set and Lakefield: Tremont adds UMWAIT, TPAUSE, CLWB, CLDEMOTE and the direct stores, which GCC enables for it. sources differ
Forms
| Instruction | Encoding | Requires |
|---|---|---|
CLDEMOTE m8
CLDEMOTE_MEMu8 | NP 0F 1C /0 | CLDEMOTE |
Latency and throughput
| Model | m8 |
|---|---|
| Sapphire Rapids | 3 / 0.5p0 p1 p5 p6 p11 |
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
pass # a hint: the line may move from the
# caches next to the core to a more
# distant one, which other cores
# reach sooner
# no fault, and no write back; a processor without CLDEMOTE runs
# 0F 1C /0 as a hint NOPNot run on a processor: the Zen 5 guest that ran the probe does not report CLDEMOTE in CPUID.
Operands
| Operand | Kind | Action |
|---|---|---|
CLDEMOTE m8 | ||
m8 | explicit | read |
Flags
None: XED records no flag that the forms test or change.
Intrinsics
The C intrinsics of Clang 23.1.2 that compile to CLDEMOTE, 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 |
|---|---|
_cldemote
void _cldemote(const void *__P) |
|
_mm_cldemote
void _mm_cldemote(const void *p) |
|
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 |
|---|---|---|
CLDEMOTE | CLDEMOTE | Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Tremont, Snow Ridge, Sierra Forest, Clearwater Forest |
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model. - 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. - 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 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2A, page 3-142 (CLDEMOTE)
- Intel 64 and IA-32 Architectures Optimization Reference Manual, Volume 1 (248966-051, October 2026)
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.