VMV.V.I

RISC-V VMV.V.I Instruction Details

Instruction ManualOPIVI

Broadcasts 5-bit signed immediate to vd body elements as an unmasked vector move.

Instruction Syntax

vmv.v.i vd, imm
Operand Breakdown
vd: destination vector register group.
Source operand: from a vector register or integer register depending on the form.
VMV is an unmasked move/broadcast form; use VMERGE for selection under v0.
VVector Data MovementScalar-Vector Transfer

Instruction Behavior

VMV.V.I is an unmasked vector integer move form in the RISC-V V extension. It broadcasts 5-bit signed immediate to vd body elements; the encoding fixes vm=1 and vs2=v0, and the syntax has no v0.t execution mask.

VMV.V.I Decode And Execute Animation

Starts from OP-V encoding fields, then shows how the unmasked VMV.V move form writes the current source value into vd body elements.

Instruction input
vmv.v.i
vs2
v0
fixed encoding field, not a syntax operand
vm
1
unmasked move form
immediate value
-3 -> 0xfffd
5-bit signed imm is sign-extended to SEW
OP-V encodingvmv.v.i
funct6
010111
vm
1
vs2
00000
simm5
11101
funct3
011
vd
00100
opcode
1010111
lane
0
1
2
3
4
5
6
7
copy
copy
copy
copy
copy
copy
copy
copy
imm
0xfffd
0xfffd
0xfffd
0xfffd
0xfffd
0xfffd
0xfffd
0xfffd
active
1
1
1
1
1
1
1
1
v4
...
...
...
...
...
...
...
...
Current step

Show OP-V 32-bit encoding fields

vmv.v.i uses OP-V encoding. The animation places fixed fields, register fields, vm, and the imm field in one encoding strip.

This animation shows only ISA-visible relationships from the official V extension: OP-V field decode, active-element reads, SEW-width integer broadcast, fixed unmasked move, and vd writeback. It does not model pipelines, caches, or timing.

Quick Understanding & Search Notes

VMV.V.I is an unmasked VMV.V immediate broadcast form that sign-extends the 5-bit signed immediate to SEW and broadcasts it to vd body elements. It performs no arithmetic and no memory access.

This page follows the official RISC-V V extension: vector instructions operate on body elements within the current vl. SEW, LMUL, tail policy, and mask policy come from the current vtype, usually set by vsetvli, vsetivli, or vsetvl.
VMV.V is an unmasked move form with encoding vm=1 and vs2=v0.
The source operand is 5-bit signed immediate; the result is broadcast to vd body elements within the current vl.
VMV.V performs no arithmetic, reads no memory, and does not use v0.t to select a subset of body elements.

Vector Execution Context

When reading VMV.V.I, do not stop at the mnemonic. Official V-extension semantics also depend on the current vl, vtype, and mask state. The suffix and operand form determine whether sources are vector, scalar, or immediate values.

Check vl first

The current vl determines the number of body elements. Typical code executes vsetvli, vsetivli, or vsetvl before this instruction.

Then check vtype

The current vtype supplies SEW, LMUL, tail policy, and mask policy; these affect element width, register-group size, and inactive/tail destination elements.

Then check vm/v0

For ordinary vector instructions with vm, vm=0 uses v0 as the execution mask and vm=1 is unmasked. A few forms such as VMERGE use v0 as data-selection input.

Official source: RISC-V V Standard Extension for Vector Operations

Common Usage Scenarios

Vector Init

Understand this scenario with real code like «vmv.v.i v8, -1».

Reduction Result

Understand this scenario with real code like «vmv.v.i v8, -1».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is OPIVI.
  • 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

VMV.V is an unmasked move form, and the syntax has no v0.t.
The encoding fixes vs2=v0 and vm=1; do not interpret it as conditional execution under v0.
Tail elements still follow the current tail policy.

FAQ

Can VMV.V.I take v0.t?

No. VMV.V is an unmasked move form; use VMERGE when conditional selection under v0 is required.

Does VMV.V.I access memory or perform arithmetic?

No. It only broadcasts bit patterns through registers and current body elements.