TZCNT (R16, R16)
Summary:
"Count the Number of Trailing Zero Bits"
Reference:
https://www.felixcloutier.com/x86/TZCNT.html
Extension:
BMI1
Category:
BMI1
ISA-Set:
BMI1
CPL:
3
iform:
TZCNT_GPRv_GPRv
iclass:
TZCNT
ASM:
TZCNT
Operands
Operand 1 (w): Register (AX, CX, DX, BX, SP, BP, SI, DI, R8W, R9W, R10W, R11W, R12W, R13W, R14W, R15W)
Operand 2 (r): Register (AX, CX, DX, BX, SP, BP, SI, DI, R8W, R9W, R10W, R11W, R12W, R13W, R14W, R15W)
Operand 3 (w, suppressed): Flags (AF: undef, CF: w, OF: undef, PF: undef, SF: undef, ZF: w)
Available performance data
Alder Lake-P
Alder Lake-E
Rocket Lake
Tiger Lake
Ice Lake
Cascade Lake
Cannon Lake
Skylake-X
Coffee Lake
Kaby Lake
Skylake
Broadwell
Haswell
Ivy Bridge
Sandy Bridge
Westmere
Nehalem
AMD Zen 4
AMD Zen 3
AMD Zen 2
AMD Zen+
Alder Lake-P
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Computed from the port usage: 1.00
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Retire slots: 1
Decoded (MITE): 1
Microcode Sequencer (MS): 0
Port usage:
1*p1
Alder Lake-E
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Microcode Sequencer (MS): 0
Rocket Lake
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Computed from the port usage: 1.00
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Retire slots: 1
Decoded (MITE): 1
Microcode Sequencer (MS): 0
Port usage:
1*p1
Tiger Lake
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Computed from the port usage: 1.00
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Retire slots: 1
Decoded (MITE): 1
Microcode Sequencer (MS): 0
Port usage:
1*p1
Ice Lake
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Computed from the port usage: 1.00
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Retire slots: 1
Decoded (MITE): 1
Microcode Sequencer (MS): 0
Port usage:
1*p1
Documentation
Throughput: 1.0
Cascade Lake
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Computed from the port usage: 1.00
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Retire slots: 1
Decoded (MITE): 1
Microcode Sequencer (MS): 0
Port usage:
1*p1
Cannon Lake
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Computed from the port usage: 1.00
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Retire slots: 1
Decoded (MITE): 1
Microcode Sequencer (MS): 0
Port usage:
1*p1
Skylake-X
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Computed from the port usage: 1.00
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Retire slots: 1
Decoded (MITE): 1
Microcode Sequencer (MS): 0
Port usage:
1*p1
IACA 2.3
Throughput
Computed from the port usage: 1.00
IACA:
1.00
Number of μops:
1
Port usage:
1*p1
IACA 3.0
Throughput
Computed from the port usage: 1.00
IACA:
0.98
Number of μops:
1
Port usage:
1*p1
Coffee Lake
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Computed from the port usage: 1.00
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Retire slots: 1
Decoded (MITE): 1
Microcode Sequencer (MS): 0
Port usage:
1*p1
Kaby Lake
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Computed from the port usage: 1.00
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Retire slots: 1
Decoded (MITE): 1
Microcode Sequencer (MS): 0
Port usage:
1*p1
Skylake
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Computed from the port usage: 1.00
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Retire slots: 1
Decoded (MITE): 1
Microcode Sequencer (MS): 0
Port usage:
1*p1
IACA 2.3
Throughput
Computed from the port usage: 1.00
IACA:
1.00
Number of μops:
1
Port usage:
1*p1
IACA 3.0
Throughput
Computed from the port usage: 1.00
IACA:
0.98
Number of μops:
1
Port usage:
1*p1
Broadwell
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Computed from the port usage: 1.00
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Retire slots: 1
Decoded (MITE): 1
Microcode Sequencer (MS): 0
Port usage:
1*p1
IACA 2.2
Throughput
Computed from the port usage: 1.00
IACA:
1.00 (with the -no_interiteration flag: 1.00)
Number of μops:
1
Port usage:
1*p1
IACA 2.3
Throughput
Computed from the port usage: 1.00
IACA:
1.00
Number of μops:
1
Port usage:
1*p1
IACA 3.0
Throughput
Computed from the port usage: 1.00
IACA:
0.98
Number of μops:
1
Port usage:
1*p1
Haswell
Measurements
Latencies
Latency operand 1 → 1:
3
Latency operand 1 → 3:
3
Latency operand 2 → 1:
3
Latency operand 2 → 3:
3
Throughput
Computed from the port usage: 1.00
Measured (loop):
1.00
Measured (unrolled):
1.00
Number of μops
Executed: 1
Retire slots: 1
Decoded (MITE): 1
Microcode Sequencer (MS): 0
Port usage:
1*p1
IACA 2.1
Latency:
8
Throughput
Computed from the port usage: 1.00
IACA:
8.00 (with the -no_interiteration flag: 1.00)
Number of μops:
2
Port usage:
1*p1+1*p23
IACA 2.2
Throughput
Computed from the port usage: 1.00
IACA:
1.00 (with the -no_interiteration flag: 1.00)
Number of μops:
1
Port usage:
1*p1
IACA 2.3
Throughput
Computed from the port usage: 1.00
IACA:
1.00
Number of μops:
1
Port usage:
1*p1
IACA 3.0
Throughput
Computed from the port usage: 1.00
IACA:
0.98
Number of μops:
1
Port usage:
1*p1
Ivy Bridge
IACA 2.2
Throughput
Computed from the port usage: 1.00
IACA:
1.00 (with the -no_interiteration flag: 1.00)
Number of μops:
1
Port usage:
1*p1
IACA 2.3
Throughput
Computed from the port usage: 1.00
IACA:
1.00
Number of μops:
1
Port usage:
1*p1
Sandy Bridge
IACA 2.2
Throughput
Computed from the port usage: 1.00
IACA:
1.00 (with the -no_interiteration flag: 1.00)
Number of μops:
1
Port usage:
1*p1
IACA 2.3
Throughput
Computed from the port usage: 1.00
IACA:
1.00
Number of μops:
1
Port usage:
1*p1
Westmere
IACA 2.2
Throughput
Computed from the port usage: 1.00
IACA:
1.67 (with the -no_interiteration flag: 1.00)
Number of μops:
1
Port usage:
1*p1
Nehalem
IACA 2.2
Throughput
Computed from the port usage: 1.00
IACA:
1.67 (with the -no_interiteration flag: 1.00)
Number of μops:
1
Port usage:
1*p1
AMD Zen 4
Measurements
Latencies
Latency operand 1 → 1:
1
Latency operand 1 → 3:
1
Latency operand 2 → 1:
1
Latency operand 2 → 3:
1
Throughput
Measured (loop):
0.25
Measured (unrolled):
0.38
Number of μops
Executed: 1
AMD Zen 3
Measurements
Latencies
Latency operand 1 → 1:
1
Latency operand 1 → 3:
1
Latency operand 2 → 1:
2
Latency operand 2 → 3:
2
Throughput
Measured (loop):
0.50
Measured (unrolled):
0.50
Number of μops
Executed: 2
Documentation
Latency: 2
Throughput: 0.50
Number of μops: 2
Port usage: ALU
AMD Zen 2
Measurements
Latencies
Latency operand 1 → 1:
1
Latency operand 1 → 3:
1
Latency operand 2 → 1:
2
Latency operand 2 → 3:
2
Throughput
Measured (loop):
0.50
Measured (unrolled):
0.50
Number of μops
Executed: 2
Documentation
Latency: 2
Throughput: 0.25
Number of μops: 2
Port usage: ALU
AMD Zen+
Measurements
Latencies
Latency operand 1 → 1:
1
Latency operand 1 → 3:
1
Latency operand 2 → 1:
2
Latency operand 2 → 3:
2
Throughput
Measured (loop):
0.54
Measured (unrolled):
0.50
Number of μops
Executed: 2
Documentation
Latency: 2
Throughput: 0.25
Number of μops: 2
Port usage: ALU