VADD.VV

RISC-V VADD.VV Instruction Details

Instruction ManualR-type

Add integer elements: vd[i] = vs2[i] + vs1[i].

Instruction Syntax

vadd.vv vd, vs2, vs1, vm
Operand Breakdown
Destination rd: register receiving the operation result.
Source rs1: register holding the first operand.
Source rs2: register holding the second operand.
VVector OperationsInteger Arithmetic

Instruction Behavior

VADD.VV performs RVV single-width integer addition. The result keeps the low SEW bits and integer overflow does not trap; use saturating add instructions when saturation is required.

Quick Understanding & Search Notes

VADD.VV is ordinary vector integer addition, not a fixed-point rounding operation. Each active element is added at SEW width and written to vd.

Overflow wraps to the low SEW bits and does not set an exception flag.
The operation applies only to active elements within vl; inactive and tail elements follow the current vma/vta policy.
Except for dedicated mask forms, vm=0 uses v0 as the execution mask and vm=1 is unmasked.

Common Usage Scenarios

Vectorized Loops

Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vadd.vv v1, v2, v3».

Array Ops

Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vadd.vv v1, v2, v3».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is R-type.
  • Confirm the operand order matches the example.
Semantic Check
  • Ensure the destination register usage is compatible with the calling convention.
  • Confirm this is not the lower-level form of a pseudo-instruction expansion.

Pitfalls / Common Confusions

All ops EEW=SEW,EMUL=LMUL. Overflow silently ignored. Use vsadd for saturating add.

FAQ

Does it use vxrm rounding?

No. VADD is ordinary integer addition; vxrm is for fixed-point rounding instructions.