VMERGE.VVM
Vector Merge
VMERGE.VVM vd, vs2, vs1, v0
Merges two vectors based on the mask (if mask=0, pick vs2; if mask=1, pick vs1).
Details
Merges elements from vs1 and vs2 (or an immediate) according to the mask: masked-on elements come from vs1, masked-off from vs2.
Pseudocode Operation
foreach(i < vl): vd[i] = v0[i] ? vs1[i] : vs2[i];
Example
VMERGE.VVM v1, v4, v2, v0
Encoding
Binary Layout
010111
31:26
0
25
vs2
24:20
vs1
19:15
000
14:12
vd
11:7
1010111
6:0
Operands
-
vd
Destination vector register -
vs2
False Src -
vs1
True Src -
v0
Mask