Extensions
Forms
19 (7 Legacy, 12 EVEX)
Data
Intel XED v2026.08.23

INC adds 1 to its operand and sets the flags as add x, 1 would, with one exception: CF keeps its value. OF is set only when the largest positive number wraps to the smallest negative one, and ZF when the operand wraps to 0, so INC can still end a loop or detect a wrap.

Why CF is left alone

CF often holds data that a loop carries from one step to the next. In a multi-word addition, each ADC passes its carry to the next, and the loop must step its pointers and count its words without disturbing CF. Intel’s Optimization Reference Manual shows such a loop for 1024-bit numbers (Example 3-26): LEA advances the pointers, DEC and JNZ count, and neither touches CF. The manual adds that this form is the faster one on Sandy Bridge, and that earlier processors stall on it.

The cost of a partial write

Because INC writes some flags and keeps another, an instruction that then reads CF together with the others depends on two earlier instructions. Intel’s manual describes this as a partial flag register stall on older processors and as an extra micro-op in Sandy Bridge, and still recommends few INC and DEC instructions before those that write the flags conditionally, such as shifts by CL (Section 3.5.2.5). Fusion with a following jump is narrower too: Intel’s Table 3-1 (Sandy Bridge) and Table 3-2 (Haswell) fuse INC only with the equal and signed conditions, never with those that read CF, while AMD’s guide lists INC among the instructions that fuse on Zen 5 (Section 2.9.3).

In compiled code

GCC 14 and Clang 23 differ at -O2: for ++*p on a long, GCC emits add qword ptr [rdi], 1, Clang inc qword ptr [rdi], and for an atomic increment GCC uses lock add and Clang lock inc. Both use lea rax, [rdi + 1] when the result goes to another register.

In 64-bit mode the one-byte encodings 40h to 47h are REX prefixes, so INC takes FF /0 (FE /0 for bytes): inc eax is 2 bytes, one fewer than add eax, 1. DEC is the same story with 1 subtracted.

In the optimization guide

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

Front end

  • Macro-fusion: Intel’s cores since Sandy Bridge (Skylake) fuse test and and with any conditional branch; cmp, add and sub with branches on the equal, unsigned and signed comparisons, but not on the sign, parity or overflow flag alone; and inc and dec only with branches on equality and the signed comparisons.
  • Macro-fusion: AMD’s Zen 3 to Zen 5 fuse more: cmp, test, add, sub, and, or, xor, inc and dec with any conditional branch, except that on Zen 3 and Zen 4 inc and dec do not fuse with a branch that reads the carry flag, which Intel’s cores do not fuse either (Zen 5, Zen 4, Zen 3). sources differ

Out of order

Silvermont to Goldmont Plus

Skylake to Cooper Lake

  • Front end: test and and fuse with any following conditional jump; cmp, add and sub with the jumps on equality and on the unsigned and signed comparisons, but not with js, jp or jo and their inverses; inc and dec only with those on equality and the signed comparisons.

Tremont

  • Integer execution: LLVM prefers add and sub to inc and dec on Tremont, where a partial flags write costs a cycle.

Zen 3

  • Integer execution: A cmp, test, add, sub, inc, dec, and, or or xor followed by a conditional branch becomes one macro-op, also with a memory operand, unless it carries a displacement together with an immediate, addresses relative to RIP or makes the pair longer than 15 bytes; inc and dec do not fuse with a branch on the carry flag, and jrcxz never fuses.

Zen 4

  • Integer execution: A cmp, test, add, sub, inc, dec, and, or or xor followed by a conditional branch becomes one macro-op, also with a memory operand, unless it carries a displacement together with an immediate, addresses relative to RIP or makes the pair longer than 15 bytes; inc and dec do not fuse with a branch on the carry flag.

Forms

Every encoding of INC that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
INC m8 INC_MEMbFE /0Base instruction set
INC r8 INC_GPR8FE /0Base instruction set
INC m16/32/64 INC_MEMvFF /0Base instruction set
INC r16/32/64 INC_GPRv_FFr0FF /0Base instruction set
INC r16/32/64 not in 64-bit mode INC_GPRv_4040+rBase instruction set
LOCK INC m8 INC_LOCK_MEMbFE /0Base instruction set
LOCK INC m16/32/64 INC_LOCK_MEMvFF /0Base instruction set
INC r8 INC_GPR8i8_APXEVEX.LLZ.NP.MAP4.WIG FE /0APX_F
INC m8 INC_MEMi8_APXEVEX.LLZ.NP.MAP4.WIG FE /0APX_F
INC r8 NF INC_GPR8i8_APX_N3EVEX.LLZ.NP.MAP4.WIG FE /0 NF=1APX_F + APX_NCI_NDD_NF
INC m8 NF INC_MEMi8_APX_N3EVEX.LLZ.NP.MAP4.WIG FE /0 NF=1APX_F + APX_NCI_NDD_NF
INC r8, r8 NDD NF optional INC_GPR8i8_GPR8i8_APX_N3EVEX.LLZ.NP.MAP4.WIG FE /0 ND=1 NF=0/1APX_F + APX_NCI_NDD_NF
INC r8, m8 NDD NF optional INC_GPR8i8_MEMi8_APX_N3EVEX.LLZ.NP.MAP4.WIG FE /0 ND=1 NF=0/1APX_F + APX_NCI_NDD_NF
INC r16/32/64 INC_GPRv_APXEVEX.LLZ.NP.MAP4.SCALABLE FF /0APX_F
INC m16/32/64 INC_MEMv_APXEVEX.LLZ.NP.MAP4.SCALABLE FF /0APX_F
INC r16/32/64 NF INC_GPRv_APX_N3EVEX.LLZ.NP.MAP4.SCALABLE FF /0 NF=1APX_F + APX_NCI_NDD_NF
INC m16/32/64 NF INC_MEMv_APX_N3EVEX.LLZ.NP.MAP4.SCALABLE FF /0 NF=1APX_F + APX_NCI_NDD_NF
INC r16/32/64, r16/32/64 NDD NF optional INC_GPRv_GPRv_APX_N3EVEX.LLZ.NP.MAP4.SCALABLE FF /0 ND=1 NF=0/1APX_F + APX_NCI_NDD_NF
INC r16/32/64, m16/32/64 NDD NF optional INC_GPRv_MEMv_APX_N3EVEX.LLZ.NP.MAP4.SCALABLE FF /0 ND=1 NF=0/1APX_F + APX_NCI_NDD_NF

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.
Modelm8r8
r16
r32
m16
m32
m64
r64INC m8INC m16
INC m32
INC m64
Sandy Bridge7 / 1p0151 / 0.33p0157 / 1p0151 / 0.33p0157 / 1p0157 / 1p015
Haswell, Broadwell, Skylake, Skylake-SP7 / 1p01561 / 0.25p01567 / 1p01561 / 0.25p01567 / 1p01567 / 1p0156
Ice Lake7 / 0.5p01561 / 0.25p01567 / 0.5p01561 / 0.25p01567 / 0.5p01567 / 0.5p0156
Alder Lake, Sapphire Rapids13 / 0.5p0 p1 p5 p6 p111 / 0.2p0 p1 p5 p6 p1112 / 0.5p0 p1 p5 p6 p111 / 013 / 0.5p0 p1 p5 p6 p1112 / 0.5p0 p1 p5 p6 p11
Lunar Lake13 / 0.5p0123451 / 0.33p13512 / 0.67p1351 / 013 / 0.5p01234512 / 0.67p135
Bonnell1 / 1p01 / 0.5p011 / 1p01 / 0.5p011 / 1p01 / 1p0
Silvermont5 / 2IEC0 IEC1 MEC1 / 0.5IEC0 IEC15 / 2IEC0 IEC1 MEC1 / 0.5IEC0 IEC15 / 2IEC0 IEC1 MEC5 / 2IEC0 IEC1 MEC
Piledriver6 / 2EX0 EX11 / 1EX0 EX16 / 2EX0 EX11 / 1EX0 EX16 / 2EX0 EX16 / 2EX0 EX1
Zen5 / 0.5ALU0 ALU1 ALU2 ALU31 / 0.25ALU0 ALU1 ALU2 ALU35 / 0.5ALU0 ALU1 ALU2 ALU31 / 0.25ALU0 ALU1 ALU2 ALU35 / 0.5ALU0 ALU1 ALU2 ALU35 / 0.5ALU0 ALU1 ALU2 ALU3
Zen 25 / 0.33ALU0 ALU1 ALU2 ALU31 / 0.25ALU0 ALU1 ALU2 ALU35 / 0.33ALU0 ALU1 ALU2 ALU31 / 0.25ALU0 ALU1 ALU2 ALU35 / 0.33ALU0 ALU1 ALU2 ALU35 / 0.33ALU0 ALU1 ALU2 ALU3
Zen 3, Zen 46 / 0.67ALU0 ALU1 ALU2 ALU31 / 0.25ALU0 ALU1 ALU2 ALU36 / 0.67ALU0 ALU1 ALU2 ALU31 / 0.25ALU0 ALU1 ALU2 ALU36 / 0.67ALU0 ALU1 ALU2 ALU36 / 0.67ALU0 ALU1 ALU2 ALU3
Jaguar6 / 1ALU0 ALU11 / 0.5ALU0 ALU16 / 1ALU0 ALU11 / 0.5ALU0 ALU119 / 19ALU0 ALU119 / 19ALU0 ALU1

Operation

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

All forms but the NDD forms
a = dest.read()                  # with LOCK: one atomic read-modify-write
r = low(a + 1)
if not nf:                       # NF=1 (APX) leaves the flags as they were
    of = r == 1 << (OSIZE - 1)   # the largest positive number wrapped
    sf = msb(r)
    zf = r == 0
    af = (a & 0xF) == 0xF        # a carry out of bit 3
    pf = parity(r)
    # CF keeps its value, unlike after ADD dest, 1
dest.write(r)                    # a 32-bit register: bits 63:32 cleared

Run on AMD Zen 5 (EPYC 9645): 72 cases. The APX forms were not run: none of these processors has APX. The forms that 64-bit mode lacks were not run: the probe runs in 64-bit mode.

NDD forms
a = src.read()
r = low(a + 1)
if not nf:                       # NF=1 leaves the flags as they were
    of = r == 1 << (OSIZE - 1)   # the largest positive number wrapped
    sf = msb(r)
    zf = r == 0
    af = (a & 0xF) == 0xF        # a carry out of bit 3
    pf = parity(r)
    # CF keeps its value
dest.write(r)                    # the new destination: bits 63:OSIZE
                                 # cleared, even for 8 and 16 bits

Not run on a processor: 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
INC r/m8 INC r/m16/32/64 LOCK INC m8 LOCK INC m16/32/64
r/m8/16/32/64explicitread, write
RFLAGSimplicitwrite
INC r/m8 NF INC r/m16/32/64 NF
r/m8/16/32/64explicitread, write
INC r8, r/m8 NDD NF optional INC r16/32/64, r/m16/32/64 NDD NF optional
r8/16/32/64explicitwrite
r/m8/16/32/64explicitread
RFLAGSimplicitwrite (NF=0)

Flags

M modified; blank: not affected. With NF=1, the forms with optional NF leave the flags unchanged. How to read.
WhenOFSFZFAFPF
NF forms
Not affected
NDD forms
NF=0MMMMM
Other forms
MMMMM

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

Attributes

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

Legacy memory forms without LOCK
accepts a LOCK prefix
LOCK forms
locked: atomic read-modify-write; accepts XACQUIRE; accepts XRELEASE

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
I86

No CPUID bit: part of the base instruction set.

Every x86-64 processor in XED’s model and Zen 3 to Zen 6
APX_F

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

Nova Lake, Diamond Rapids
APX_F_N3

APX_F + APX_NCI_NDD_NF
CPUID.(EAX=07H,ECX=1):EDX[21] APX_F
CPUID.(EAX=29H,ECX=0):EBX[0] APX_NCI_NDD_NF

Same as APX_F

More General-purpose instructions

All 109 General-purpose 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. LLVM 23.1.2's x86 scheduling models (commit 85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them.
  4. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2A, page 3-457 (INC)
  5. Intel Advanced Performance Extensions (Intel APX) Architecture Specification, revision 9.0 (355828-009, August 2026)
  6. AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions (24594, rev. 3.39, October 2026)
  7. Intel 64 and IA-32 Architectures Optimization Reference Manual, Volume 1 (248966-051, October 2026)
  8. 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.