ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

CLZ

T2 arm64 bitmanip insn
AArch64 A64 Instruction: CLZ
SourceLLVM AArch64 Instruction & Feature Definitions (llvm_aarch64_isa)
Reliability TierT2 — Compiler & Kernel Reference
ISA / Silicon ScopeArmv8-A / Armv9-A (A64)
Armv8-A / Armv9-A (SVE, SVE2, SME, FP8, MTE, Apple Silicon)
License & VersionApache-2.0 WITH LLVM-exception
llvm/main
Upstreamhttps://github.com/llvm/llvm-project/tree/main/llvm/lib/Target/AArch64
Privilegeuser
ExtensionsA64, NEON

Summary

AArch64 CLZ instruction (A64, 32-bit) with 8 encoding variants extracted from LLVM TableGen. Extensions: NEON.

Syntax / Encoding

CLZWr: clz $Rd, $Rn
CLZv16i8: clz $Rd.16b, $Rn.16b
CLZv2i32: clz $Rd.2s, $Rn.2s
CLZv4i16: clz $Rd.4h, $Rn.4h
CLZv4i32: clz $Rd.4s, $Rn.4s
CLZv8i16: clz $Rd.8h, $Rn.8h
CLZv8i8: clz $Rd.8b, $Rn.8b

Cross-Chip Latency & Throughput (8 cores)

MicroarchitectureLatency (cycles)Recip. TPuopsPortsSource
Apple M1 Firestorm (P-core)1–20.16711 - - u1-6apple_dougallj
Apple M1 Icestorm (E-core)1–20.33311 - - u1-3apple_dougallj
Samsung Exynos M510.171M5UnitAWllvm_sched_models
NVIDIA Olympus (Vera)20.171OlympusUnitVllvm_sched_models
Qualcomm Oryon20.251ORYONFP0123llvm_sched_models
Marvell ThunderX3 T11031.52THX3T110FP23+THX3T110FP0123llvm_sched_models
Fujitsu A64FX (SVE 512b)411A64FXGI0llvm_sched_models
Marvell ThunderX2 T9950.52THX2T99F01llvm_sched_models

Binary Encodings (8)

WidthFormatBit PatternMask / Match
32CLZWr0101101011000000000100xxxxxxxxxx0xfffffc00 / 0x5ac01000
32CLZXr1101101011000000000100xxxxxxxxxx0xfffffc00 / 0xdac01000
32CLZv16i80110111000100000010010xxxxxxxxxx0xfffffc00 / 0x6e204800
32CLZv2i320010111010100000010010xxxxxxxxxx0xfffffc00 / 0x2ea04800
32CLZv4i160010111001100000010010xxxxxxxxxx0xfffffc00 / 0x2e604800
32CLZv4i320110111010100000010010xxxxxxxxxx0xfffffc00 / 0x6ea04800
32CLZv8i160110111001100000010010xxxxxxxxxx0xfffffc00 / 0x6e604800
32CLZv8i80010111000100000010010xxxxxxxxxx0xfffffc00 / 0x2e204800

Operands

NameDescription
Rd
Rn
Rd
Rn
Rd
Rn
Rd
Rn