riscv-non-isa / rvv-intrinsic-doc

https://jira.riscv.org/browse/RVG-153
BSD 3-Clause "New" or "Revised" License
281 stars 89 forks source link

why vslideup intrinsics have dest parameter #265

Closed datao2001 closed 1 year ago

datao2001 commented 1 year ago

Hi, I am confused that vslideup intrinsics have dest parameter and vslidedown intrinsics don't have. Is dest parameter redundant?

image

topperc commented 1 year ago

The dest parameter is there to support the "unchanged" part of this from the vector spec.

vslideup behavior for destination elements
 OFFSET is amount to slideup, either from x register or a 5-bit immediate

                  0 <  i < max(vstart, OFFSET)  Unchanged
max(vstart, OFFSET) <= i < vl                   vd[i] = vs2[i-OFFSET] if v0.mask[i] enabled
                 vl <= i < VLMAX                Follow tail policy

Slidedown does not have any "unchanged" elements that are not part of the tail so its intrinsic does not have a "dest" parameter.

kito-cheng commented 1 year ago

Close since I believe Craig has answered :)