Does vcompress.vm write zero for unselected elements?
No. Unselected source elements are not packed into the contiguous result; destination elements after the packed result are tail elements governed by vtype.vta.
Pack vs2 elements selected by the vs1 mask into contiguous positions starting at vd[0].
VCOMPRESS.VM uses the explicit vs1 mask to select elements from vs2 and writes the selected elements contiguously from vd[0] in original order; it is encoded as an unmasked instruction, and destination elements after the packed result are tail elements.
Starts from OP-V encoding fields, then shows how VCOMPRESS uses the explicit vs1 selection mask to pack selected vs2 elements in order starting at vd[0].
Require valid vtype, enabled VS, and supported SEW; VL=0 updates nothing, including tails. Steps are teaching stages, not processor cycles.
The teaching model fixes LMUL=m1 and vstart=0 and shows only body elements in the selected VL. Full V requires VLEN≥128; with LMUL=m1 this model uses VLEN=VLMAX×SEW=256. A nonzero vstart for VCOMPRESS.VM raises an illegal instruction exception, so it is not offered as an executable input.
vcompress.vm uses OP-V encoding. The animation places fixed fields, register fields, vm, and the vs1 field in one encoding strip.
This animation shows only ISA-visible relationships from the official V extension: OP-V field decode, active-element reads, element-index/packing/select/move rearrangement integer mask compress, boundary/selection rules, and vd writeback. It does not model pipelines, caches, or timing.
vcompress.vm performs stable compaction of source lanes with vs1=1 within vl: the first selected element writes vd[0], the second writes vd[1], and so on.
vs2 supplies SEW-wide source elements; vs1 is the explicit EEW=1 selection mask. Select from the first vl elements and pack in source order starting at vd[0].
vm is fixed to 1; vm=0 is reserved, and the syntax has no additional v0.t execution mask.
vd cannot overlap vs2 or vs1; vs2 and vs1 cannot read one register at different EEWs. Destination elements after the packed result are tails governed by vta.
Require V, supported vtype, and vstart=0; nonzero vstart raises illegal-instruction, with traps reporting vstart=0.
Assume V with supported e32,m1 and VLMAX≥4, a0=4, and v8=[5,20,-3,40]. The example compare generates selection bits 0101 in lane order 0..3; v12 begins [20,40] after compaction, with subsequent ta tails not assumed zero.
Assume V with supported e32,m1 and VLMAX≥4, a0=4, and v8=[5,20,-3,40]. The example compare generates selection bits 0101 in lane order 0..3; v12 begins [20,40] after compaction, with subsequent ta tails not assumed zero.
No. Unselected source elements are not packed into the contiguous result; destination elements after the packed result are tail elements governed by vtype.vta.