corrects bug
This commit is contained in:
parent
fd11ce18c4
commit
19e38ec898
@ -1078,10 +1078,11 @@ template <unsigned VLEN, typename src_elem_t> void vid(uint8_t* V, uint64_t vl,
|
||||
return;
|
||||
}
|
||||
template <unsigned VLEN, typename src_elem_t> uint64_t scalar_move(uint8_t* V, vtype_t vtype, unsigned vd, uint64_t val, bool to_vector) {
|
||||
auto vd_view = get_vreg<VLEN, src_elem_t>(V, vd, 1);
|
||||
unsigned vlmax = VLEN * vtype.lmul() / vtype.sew();
|
||||
auto vd_view = get_vreg<VLEN, src_elem_t>(V, vd, vlmax);
|
||||
if(to_vector) {
|
||||
vd_view[0] = val;
|
||||
for(unsigned idx = 1; idx < VLEN / (vtype.sew() * RFS); idx++) {
|
||||
for(unsigned idx = 1; idx < vlmax; idx++) {
|
||||
vd_view[idx] = vtype.vta() ? vd_view[idx] : vd_view[idx];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user