frasercrmck wrote: I believe RISC-V's `vctz.v` instruction may return `0` for a zero value input - at least going by the pseudocode specification? See https://github.com/riscv/riscv-crypto/blob/main/doc/vector/insns/vctz.adoc https://github.com/llvm/llvm-project/pull/131995