SIMD ISAReturn TypeNameArgumentsInstruction Group
Neonuint32x2_tvclz_u32(uint32x2_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.2S result
This intrinsic compiles to the following instructions:

CLZ Vd.2S,Vn.2S

Argument Preparation
a register: Vn.2S
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;