VMERGE.VXM

Vector Merge Scalar

VMERGE.VXM vd, vs2, rs1, v0

Merges integer scalar vs vector based on mask.

Encoding

Binary Layout
0101110
31:25
vs2
24:20
rs1
19:15
100
14:12
vd
11:7
1010111
6:0
 
Format OPIVX
Opcode 0x5C004057
Extension V

Operands

  • vd
    Destination vector register
  • vs2
    False
  • rs1
    True (Scalar)

Example

VMERGE.VXM v1, v4, a0, v0

Related

More in V

Description

Merges elements from vs1 and vs2 (or an immediate) according to the mask: masked-on elements come from vs1, masked-off from vs2.

Operation

vd[i] = v0[i] ? rs1 : vs2[i];