SIMD ISAReturn TypeNameArgumentsInstruction Group
Neonint8_tvmaxvq_s8(int8x16_t a)Vector arithmetic / Across vector arithmetic / Maximum across vector
Description
Signed Maximum across Vector. This instruction compares all the vector elements in the source SIMD&FP register, and writes the largest of the values as a scalar to the destination SIMD&FP register. All the values in this instruction are signed integer values.
Results
Bd result
This intrinsic compiles to the following instructions:

SMAXV Bd,Vn.16B

Argument Preparation
a register: Vn.16B
Architectures
A64

Operation

CheckFPAdvSIMDEnabled64();
bits(datasize) operand = V[n];
integer maxmin;
integer element;

maxmin = Int(Elem[operand, 0, esize], unsigned);
for e = 1 to elements-1
    element = Int(Elem[operand, e, esize], unsigned);
    maxmin = if min then Min(maxmin, element) else Max(maxmin, element);

V[d] = maxmin<esize-1:0>;