Extensions
Mnemonics
JO, JNO, JB, JC, JNAE, JNB, JNC, JAE, JZ, JE, JNZ, JNE, JBE, JNA, JNBE, JA, JS, JNS, JP, JPE, JNP, JPO, JL, JNGE, JNL, JGE, JLE, JNG, JNLE, JG
Forms
3 (3 Legacy)
Data
Intel XED v2026.08.23

A conditional jump almost always follows a CMP or TEST, and which mnemonic to use depends on whether the values compared are signed. After CMP a, b:

RelationUnsignedSigned
a == bJE (JZ)JE (JZ)
a != bJNE (JNZ)JNE (JNZ)
a < bJB (JC, JNAE)JL (JNGE)
a <= bJBE (JNA)JLE (JNG)
a > bJA (JNBE)JG (JNLE)
a >= bJAE (JNB, JNC)JGE (JNL)

“Below” and “above” are the unsigned words, “less” and “greater” the signed ones. After TEST x, x, JZ means x is zero and JS that it is negative. The same four-bit condition code, whose lowest bit inverts the test, selects the condition in SETcc, CMOVcc and APX’s CCMPscc and CFCMOVcc.

Each condition has two encodings: 70+cc with an 8-bit displacement (2 bytes, for targets up to 128 bytes away) and 0F 80+cc with a 32-bit one (6 bytes). As for JMP and CALL, Intel’s manual fixes the operand size of near branches at 64 bits in 64-bit mode. AMD’s lets a 66 prefix make a Jcc 16 bits: a 2-byte displacement in the 0F 80+cc form and RIP cut to 16 bits, so those bytes have different lengths on the two.

Performance, by the vendors’ optimization manuals:

  • Fusion. A CMP or TEST (and some arithmetic) directly followed by a Jcc is decoded as one operation. On Intel’s cores since Haswell, TEST and AND fuse with every condition, and CMP, ADD and SUB with all but the overflow, sign and parity ones, never when the first instruction has both a memory operand and an immediate. On Zen 5, CMP, TEST, SUB, ADD, INC, DEC, OR, AND and XOR fuse.
  • Hints. The 3E prefix is a “taken” hint. From Intel’s Redwood Cove cores on, the processor uses it for a branch it has no history of; the 2E “not taken” hint is ignored.
  • Unpredictable branches. Intel’s optimization manual suggests CMOVcc or SETcc in their place, but not for branches that predict well.

JRCXZ and LOOP are the jumps that test RCX rather than the flags.

In the optimization guide

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

Front end

  • Macro-fusion: Macro-fusion turns an instruction that sets the flags and the conditional branch right after it into one operation, which takes one slot in decode, rename and retirement.
  • 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
  • Code alignment and padding: On the Skylake family with the microcode update for its JCC erratum (Skylake), 32-byte boundaries matter for every jump: one that crosses such a boundary or ends on it is no longer cached and runs from the decoders.

Branches

  • Direction and target: A conditional branch the predictor knows nothing about is predicted not taken. sources differ
  • Direction and target: Prefixes 2Eh and 3Eh before a conditional jump once served as static hints, on the Pentium 4.
  • Direction and target: LLVM 23.1.2 emits the taken hint only for Granite Rapids (-mtune=graniterapids), only with the hidden option -enable-branch-hint, and only on jumps that its branch probabilities put above 50%.

Bulldozer to Excavator

  • Branches: A cmp or test directly followed by a conditional branch fuses into one op, unless the compare uses a RIP-relative address or has a displacement as well as an immediate; no other instruction fuses. sources differ

Golden Cove and Raptor Cove

  • Branches: A conditional branch the predictor holds no history for is predicted not taken, so the rarely run branches that are usually taken cost a misprediction.

Ice Lake to Rocket Lake

  • Front end: A cmp, add, sub, inc or dec fuses with a following jump on zero, carry or an unsigned or signed comparison, and test or and with any conditional jump; or, xor, adc, sbb, shifts and js, jo and jp never fuse.

Redwood Cove

  • Branches: A conditional jump with a 3Eh prefix is a taken hint: when the predictor holds nothing on the branch, the decoder turns its default not-taken guess into taken and fetches from the target.
  • Branches: The hint applies to Jcc only, not to jrcxz or loop.
  • Branches: Hints pay on branches that run rarely and are mostly taken, where the predictor has likely forgotten them, as in programs with more branches than the predictor holds; on a hot branch it only makes the code longer.
  • Branches: Redwood Cove’s performance events find the branches that a taken hint would help.

Silvermont to Goldmont Plus

  • Front end: Back-to-back branches cost Silvermont and Goldmont 3 cycles in the decoders.

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.
  • The JCC erratum: Under rare conditions a jump that crosses a 64-byte line could make these cores misbehave (erratum SKX102).

Zen and Zen+

  • Integer execution: Only a cmp or test directly followed by a conditional branch fuses into one macro-op, and not when it has a displacement together with an immediate, or an address relative to RIP; no other arithmetic or logic instruction fuses.

Zen 2

  • Integer execution: Only a cmp or test followed by a conditional branch fuses into one macro-op, not one with a displacement together with an immediate or an address relative to RIP; the arithmetic and logic instructions that fuse on Zen 3 do not.

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.

Zen 5

  • 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, within limits on the sizes of its displacement and immediate.

Forms

Every encoding of Jcc that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
Jcc rel8 Jcc_RELBRb70+cc cbBase instruction set
Jcc rel32 64-bit mode only Jcc_RELBRd0F 80+cc cdBase instruction set
Jcc rel16/32 not in 64-bit mode Jcc_RELBRz0F 80+cc cw/cdBase instruction set

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.
Modelrel8
rel32
Sandy Bridge1 / 1p5
Haswell, Broadwell, Skylake, Skylake-SP, Ice Lake, Alder Lake, Sapphire Rapids1 / 0.5p06
Lunar Lake1 / 0.33p024
Bonnell1 / 1p1
Silvermont1 / 1IEC1
Piledriver1 / 1Branch EX1
Zen, Zen 21 / 0.25ALU0 ALU1 ALU2 ALU3
Zen 3, Zen 41 / 0.5ALU0 BRU1
Jaguar1 / 0.5ALU0 ALU1

Operation

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

w = OSIZE                        # the size of the target
n = 0
if OSIZE == 16:                  # a 66 prefix
    if INTEL:
        w = 64                   # ignored: SDM
    else:
        if rel.bits == 32:
            n = 2                # a rel16, 2 bytes shorter than XED
                                 # decodes: APM, Zen 5
if cond(CC):                     # the flags from before the instruction
    t = low(rip - n + signed(rel), w)
    if not canonical(t):
        fault(GP, 0)
    rip = t
else:
    rip = rip - n                # on to the next instruction

Run on AMD Zen 5 (EPYC 9645): 101 cases. Its branches for Intel's processors were not run: no Intel processor ran these forms. The forms that 64-bit mode lacks were not run: the probe runs in 64-bit mode.

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
Jcc rel8 Jcc rel32 64-bit mode only Jcc rel16/32 not in 64-bit mode
rel8/16/32explicitread
rIPimplicitread, write
RFLAGSimplicitread

Flags

T tested; blank: not affected. How to read.
WhenOFSFZFPFCF
All forms
JOT
JNOT
JBT
JNBT
JZT
JNZT
JBETT
JNBETT
JST
JNST
JPT
JNPT
JLTT
JNLTT
JLETTT
JNLETTT

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

More General-purpose instructions

All 109 General-purpose 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-499 (Jcc)
  5. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
  6. AMD64 Architecture Programmer's Manual, Volume 2: System Programming (24593, rev. 3.46, October 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 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.