SIMD ISAReturn TypeNameArgumentsInstruction Group
Neonint8x16_tvclzq_s8(int8x16_t a)Bit manipulation / Count leading zeros
Description
Count Leading Zero bits (vector). This instruction counts the number of consecutive zeros, starting from the most significant bit, in each vector element in the source SIMD&FP register, places the result into a vector, and writes the vector to the destination SIMD&FP register.
Results
Vd.16B result
This intrinsic compiles to the following instructions:

CLZ Vd.16B,Vn.16B

Argument Preparation
a register: Vn.16B
Architectures
v7, A32, A64

Operation

CheckFPAdvSIMDEnabled64();
bits(datasize) operand = V[n];
bits(datasize) result;

integer count;
for e = 0 to elements-1
    if countop == CountOp_CLS then
        count = CountLeadingSignBits(Elem[operand, e, esize]);
    else
        count = CountLeadingZeroBits(Elem[operand, e, esize]);
    Elem[result, e, esize] = count<esize-1:0>;
V[d] = result;