SIMD ISAReturn TypeNameArgumentsInstruction Group
Neonint32x2_tvrhadd_s32(int32x2_t a, int32x2_t b)Vector arithmetic / Add / Narrowing addition
Description
Signed Rounding Halving Add. This instruction adds corresponding signed integer values from the two source SIMD&FP registers, shifts each result right one bit, places the results into a vector, and writes the vector to the destination SIMD&FP register.
Results
Vd.2S result
This intrinsic compiles to the following instructions:

SRHADD Vd.2S,Vn.2S,Vm.2S

Argument Preparation
a register: Vn.2Sb register: Vm.2S
Architectures
v7, A32, A64

Operation

CheckFPAdvSIMDEnabled64();
bits(datasize) operand1 = V[n];
bits(datasize) operand2 = V[m];
bits(datasize) result;
integer element1;
integer element2;

for e = 0 to elements-1
    element1 = Int(Elem[operand1, e, esize], unsigned);
    element2 = Int(Elem[operand2, e, esize], unsigned);
    Elem[result, e, esize] = (element1 + element2 + 1)<esize:1>;

V[d] = result;