Does VREDOR.VS write the result to every vd element?
No. The effective reduction result is written only to vd[0]; it is neither an element-wise output nor a broadcast result.
VREDOR.VS uses the vs1[0] seed to perform bitwise OR reduction over active vs2 elements, writing only vd[0].
VREDOR.VS is a RISC-V V extension single-width integer reduction instruction. Syntax is `vredor.vs vd, vs2, vs1, vm`; it uses vs1[0] as the seed, includes only masked-in active vs2 elements within the current vl in the bitwise OR reduction, and writes the final SEW-width result to vd[0]. If vl=0, the destination register is not updated. Each step reduces SEW-bit patterns with the bitwise operation.
Starts from OP-V encoding fields, then shows how VREDOR uses vs1[0] as the seed, reduces only active vs2 elements, and writes the SEW-width result to vd[0].
Require V 1.0, enabled vector state and valid supported vtype/SEW. Fix LMUL=m1, vstart=0, VLEN=4096 and VLMAX=4096/16=256. A nonzero vstart for a reduction raises an illegal-instruction exception, so it is not offered as an executable input. A reduction writes element 0 of one vd; the rest is tail governed by vta. vd may overlap sources or v0. With vs2=vs1, the seed must equal vs2[0]. When v0 supplies the EEW=1 mask it cannot also supply SEW data. VL=0 updates no destination elements. Only body is shown without definite inactive/tail values. Steps are teaching stages, not processor cycles.
vredor.vs uses OP-V encoding. The animation places fixed fields, register fields, vm, and the vs1 field in one encoding strip.
This animation shows OP-V field decode, active-element reads, integer bitwise OR reduction seeded by vs1[0], mask participation filtering, and vd[0] writeback. These are teaching stages; they do not model pipelines, caches, or timing.
VREDOR.VS is a single-width integer reduction instruction; the result is collected in element 0 of the destination vector register.
Syntax: vredor.vs vd, vs2, vs1[, v0.t]; omit the mask for vm=1, include v0.t for vm=0. 32-bit OP-V: opcode=1010111, funct3=010 (OPMVV), funct6=000010.
vs2 is a SEW/LMUL vector group; vs1[0] is the SEW seed and vd[0] the SEW result. Each scalar occupies one vector register regardless of LMUL.
With vl>0 the seed always participates, and only active vs2 elements contribute; all masked off still writes the seed. vl=0 leaves vd unchanged; nonzero vstart raises an illegal-instruction exception. Elements beyond vd[0] are tail governed by vta.
vd may overlap sources or v0. Equal vs2/vs1 must read a consistent element 0 from the same register. v0 cannot provide both the EEW=1 mask and SEW data. Source-group starts align to EMUL, EMUL≤8.
Require V 1.0, enabled vector state and valid supported vtype/SEW. The animation fixes m1, vstart=0 and VLEN=4096; teaching steps are not processor cycles.
Assume enabled V/VS, valid m1, supported SEW, VLEN≥128, vl=4, vstart=0, v0.mask[0..3]=1111 and initialized sources. SEW=8, v4[0]=3, v12=[16,3,12,33] → v8[0]=63. Reduce the seed with active sources; other destination elements are tail governed by vta. vl=0 leaves the destination unchanged.
Assume enabled V/VS, valid m1, supported SEW, VLEN≥128, vl=4, vstart=0, v0.mask[0..3]=1111 and initialized sources. SEW=8, v4[0]=3, v12=[16,3,12,33] → v8[0]=63. Reduce the seed with active sources; other destination elements are tail governed by vta. vl=0 leaves the destination unchanged.
No. The effective reduction result is written only to vd[0]; it is neither an element-wise output nor a broadcast result.
vs1[0] supplies the reduction seed; the whole vs1 vector is not a same-lane second input paired with vs2.
With vl>0 and every vs2 element masked off, the vs1[0] seed is still written to vd[0]. With vl=0, the destination register is not updated.