Does it use vxrm rounding?
No. VADD.VI is ordinary integer addition; vxrm is for fixed-point rounding instructions.
Add each vs2 element with imm: vd[i]=vs2[i]+imm.
VADD.VI performs ordinary vector integer addition on active elements: vd[i] = vs2[i] + sign_extend(imm). imm is a 5-bit signed immediate (-16..15), sign-extended to SEW. The result wraps at SEW width; this is not saturating add and does not use vxrm rounding.
VADD.VI performs ordinary integer addition for each active element. The second operand is a 5-bit immediate sign-extended to SEW, and the result is written at SEW width.
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vadd.vi v1, v2, 5».
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vadd.vi v1, v2, 5».
No. VADD.VI is ordinary integer addition; vxrm is for fixed-point rounding instructions.
imm is a 5-bit signed immediate, sign-extended to the current SEW.